Hi Abhishek
No i am not getting any exception.I added the proxy web service into my
application by giving the WSDL path..
Then i wrote this piece of code to invoke it.
try { // Call Web Service Operation
businessschoolservice.SchoolProxy service = new
businessschoolservice.SchoolProxy();
businessschoolservice.SchoolProxyPortType port =
service.getSchoolProxyHttpsEndpoint();
// TODO initialize WS operation arguments here
java.lang.String processstring = "";
// TODO process result here
java.lang.String result =
port.processProspectDetails(xmlresult);
System.out.println("Result = " + result);
} catch (Exception ex) {
// TODO handle custom exceptions here
}
When the debugger reaches this particular line of code :
java.lang.String result = port.processProspectDetails(xmlresult);
it goes out of the loop without throwing nay exception.
Hmm.. your catch block is empty, but I would expect an exception if
something is going wrong..
I was able to get the result when i was invoking a normal web service.The
parameter that i am
sending (xmlresult) is a normal string but in xml format e.g
"<?xml version="1.0" encoding="UTF-8"?>
<prospect>
<Name>abhi</Name>
<Age>23</Age>
<Address>exeter</Address>
<SSN>2345</SSN>
<Program>Law</Program>
</prospect>
"
This is not good.. you should not be sending an XML payload in a SOAP
message as a String! and your payload even has the XML declaration! This
is very poor design and could cause many problems
getprospectdetails is the method that i am invoking... I saw in some other
post that some Soap Header is missing in such cases..(if that is the case
how to resolve it.)
and the wsdl of actual web service and proxy web service is also different
as in proxy web service.in proxy web service:
<wsdl:service name="SchoolProxy">
<wsdl:port name="SchoolProxyHttpsSoap11Endpoint"
binding="tns:SchoolProxySoap11Binding">
<soap:address
location="https://wkstn67:8243/soap/SchoolProxy.SchoolProxyHttpsSoap11Endpoint"/>
</wsdl:port>
<wsdl:port name="SchoolProxyHttpSoap11Endpoint"
binding="tns:SchoolProxySoap11Binding">
<soap:address
location="http://wkstn67:8280/soap/SchoolProxy.SchoolProxyHttpSoap11Endpoint"/>
</wsdl:port>
<wsdl:port name="SchoolProxyHttpSoap12Endpoint"
binding="tns:SchoolProxySoap12Binding">
<soap12:address
location="http://wkstn67:8280/soap/SchoolProxy.SchoolProxyHttpSoap12Endpoint"/>
</wsdl:port>
<wsdl:port name="SchoolProxyHttpsSoap12Endpoint"
binding="tns:SchoolProxySoap12Binding">
<soap12:address
location="https://wkstn67:8243/soap/SchoolProxy.SchoolProxyHttpsSoap12Endpoint"/>
</wsdl:port>
<wsdl:port name="SchoolProxyHttpEndpoint"
binding="tns:SchoolProxyHttpBinding">
<http:address
location="http://wkstn67:8280/soap/SchoolProxy.SchoolProxyHttpEndpoint"/>
</wsdl:port>
<wsdl:port name="SchoolProxyHttpsEndpoint"
binding="tns:SchoolProxyHttpBinding">
<http:address
location="https://wkstn67:8243/soap/SchoolProxy.SchoolProxyHttpsEndpoint"/>
</wsdl:port>
</wsdl:service>
there are so many ports..
but in actual web service there is only one port.
Can you attach the WSDL of the original service?
If i can not send my parameter as a string..Should i send it as a xml doc..
Yes, please send XML data as XML if the service is also in your control
One more doubt i have how the proxy service recognize the input
parameters..
Not sure I understand this.. but the proxy service merely passes the
request to the actual service, and may or may not look at the payload -
depending on the configuration you specify
cheers
asankha
--
Asankha C. Perera
http://adroitlogic.org
http://esbmagic.blogspot.com