Call SOAP web service method with simple parameters from browser using URL ONLY

What controls whether a web service method can be called from the browser via a URL or not?

The platform (by the way) on which the author is built (java vs .net vs xxx)?

I know that web services based on .net provide a nice interface for calling methods. Why doesn't this happen for java-based? Because it is soap in both cases if they don't behave the same? What is the .net implementation, adding Java is not there? What are the required configuration options / properties that control if the soap web service is activated by the browser? I've seen lots of online examples where, for simple arguments, the web service methods appear to be accessible via a URL by the browser. But it doesn't work in my case.

I have a working web service (JAX-WS), wsdl as shown below:

<?xml version="1.0" encoding="UTF-8" ?> 
<!--  Published by JAX-WS RI at http://jax-ws.dev.java.net. RI version is JAX-WS RI 2.1.6 in JDK 6. 
--> 
<!--  Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI version is JAX-WS RI 2.1.6 in JDK 6. 
--> 
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://services/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://services/" name="MYServiceService">
    <types>
        <xsd:schema>
            <xsd:import namespace="http://services/" schemaLocation="http://example.com:8888/myservice?xsd=1" /> 
        </xsd:schema>
    </types>
    <message name="getToken">
        <part name="parameters" element="tns:getToken" /> 
    </message>
    <message name="getTokenResponse">
        <part name="parameters" element="tns:getTokenResponse" /> 
    </message>
    <portType name="MYService">
        <operation name="getToken">
            <input message="tns:getToken" /> 
            <output message="tns:getTokenResponse" /> 
        </operation>
    </portType>
    <binding name="MYServicePortBinding" type="tns:MYService">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> 
        <operation name="getToken">
            <soap:operation soapAction="" /> 
            <input>
                <soap:body use="literal" /> 
            </input>
            <output>
                <soap:body use="literal" /> 
            </output>
        </operation>
    </binding>
    <service name="MYServiceService">
        <port name="MYServicePort" binding="tns:MYServicePortBinding">
            <soap:address location="http://example.com:8888/myservice" /> 
        </port>
    </service>
</definitions>

      

Works great (if used via client app I get this method successfully).

But when I try to use through the browser, I get a message "No JAX-WS context information available"

.

http://example.com:8888/myservice?wsdl

works fine but

http://example.com:8888/myservice/getToken?param0=xxx&param1=yyy

gives me the following message. param0,param1

are the same names I used in the implementation and they are both types String

.

I am hosting a web service in JRE 1.6 as a standalone Java program.

+3


source to share





All Articles