Hi Mark,
WSDL has the soapbind:address as
http://javector-server:8080/css/orders
where as your are trying to create Service instance using
http://localhost:8080/jaxrpc-OrderProcessor/orderproc?WSDL. Can you
please make sure the wsdlURL is a valid and accessible URL ?
Also, can you please send the complete stack trace for NPE..
Thanks for your interest in JAX-RPC.
Regards,
-Arun
Mark D. Hansen wrote:
>I'm having trouble generating a Service instance using ServiceFactory. I keep getting NPEs. The server side is no problem. The ties get generated OK and deploy with no problem on Tomcat. But, I can't seem to generate the Service on the client side from the WSDL without getting NPEs.
>
>Any suggestions will be much appreciated.
>
>Here is the code for instantiation.
>
> String wsdlURL = "http://localhost:8080/jaxrpc-OrderProcessor/orderproc?WSDL";
> String namespaceURI = "http://www.xyzcorp.com/css/wsdl";
> String serviceName = "orderProcessingService";
> URL urlWSDL = new URL(wsdlURL);
> QName qnameService =
> new QName(namespaceURI, serviceName);
> log.info("urlWSDL = " + urlWSDL + NL +
> "qnameService = " + qnameService);
> Service orderService =
> serviceFac.createService(urlWSDL, qnameService);
>
>Here is part of the WSDL:
>
><wsdl:definitions
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xyz="http://www.xyzcorp.com/xyzcorp.xsd"
> xmlns:oms="http://www.xyzcorp.com/oms/order.xsd"
> xmlns:tns="http://www.xyzcorp.com/css/wsdl"
> targetNamespace="http://www.xyzcorp.com/css/wsdl">
> <wsdl:types>
> <schema ...>
> ....
> </schema>
> </wsdl:types>
> <wsdl:message name="order">
> <wsdl:part name="body" element="oms:SalesOrder"/>
> <wsdl:part name="messagetypeHeader" element="xyz:typeofmessage"/>
> </wsdl:message>
> <wsdl:portType name="orderProcessingPortType">
> <wsdl:operation name="orderProcessingInput">
> <wsdl:input message="tns:order"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="orderProcessingBinding" type="tns:orderProcessingPortType">
> <soapbind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="orderProcessingInput">
> <wsdl:input>
> <soapbind:body parts="body" use="literal"/>
> <soapbind:header message="tns:order" part="messagetypeHeader" use="literal"/>
> </wsdl:input>
> <soapbind:operation style="document"/>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="orderProcessingService">
> <wsdl:port name="orderProcessingPort" binding="tns:orderProcessingBinding">
> <soapbind:address location="http://javector-server:8080/css/orders"/>
> </wsdl:port>
> </wsdl:service>
></wsdl:definitions>
>
>
--
=============================================
There is only one me, I must live myself!
There is only one today, I must live itself!
=============================================
http://members.tripod.com/~apgupta/index.html
=============================================