users@jax-rpc.java.net

Re: ServiceFactory.createService() giving NullPointerException

From: Anne Thomas Manes <anne_at_MANES.NET>
Date: Mon, 21 Jul 2003 18:08:41 -0400

I know that Systinet WASP supports doc/lit with dynamic proxy client.
I believe that Axis, XMLBus, GLUE, BEA, and CapeClear all support doc/lit
with dynamic proxy.

Anne

----- Original Message -----
From: "Mark D. Hansen" <khookguy_at_YAHOO.COM>
To: <JAXRPC-INTEREST_at_JAVA.SUN.COM>
Sent: Friday, July 18, 2003 9:03 PM
Subject: Re: ServiceFactory.createService() giving NullPointerException


> Thanks. Just so I know ... is that bug documented anywhere? Is there a
> bug database that is visible to users of the RI?
>
> Also, do you know of any implementations that do support doc/lit WSDL
> with dynamic proxy client?
>
> -- Mark
>
> -----Original Message-----
> From: Public discussion on JAX-RPC
> [mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM]On Behalf Of Arun Gupta
> Sent: Friday, July 18, 2003 6:38 PM
> To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> Subject: Re: ServiceFactory.createService() giving NullPointerException
>
>
> Hi Mark,
>
> You found a bug!
>
> Oneway operations are not supported for a doc/lit WSDL when using
> dynamic proxy client. This will be fixed in the next version of JWSDP
> expected to release later this year.
>
> Thanks for your interest in JAX-RPC.
>
> Thanks,
> -Arun
>
> Mark D. Hansen wrote:
>
> >Please try this one. There are no references to "prettyprint.xslt" in
> >the code anywhere at this point.
> >
> >-- Mark
> >
> >
> >-----Original Message-----
> >From: Public discussion on JAX-RPC
> >[mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM]On Behalf Of Arun Gupta
> >Sent: Thursday, July 17, 2003 5:27 PM
> >To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> >Subject: Re: ServiceFactory.createService() giving NullPointerException
> >
> >
> >I'm getting the following error now ...
> >
> >[INFO] StandardHostDeployer - -Installing web application at context
> >path
> >/jaxrpc-OrderProcessor from URL
> >jar:file:/home/arung/testbed/jwsdp1.2/webapps/jaxrpc-OrderProcessor.war
> !
> >/
> >[INFO] http - -JAX-RPC context listener initializing
> >javax.xml.transform.TransformerConfigurationException:
> >javax.xml.transform.TransformerConfigurationException:
> >javax.xml.transform.TransformerException:
> java.io.FileNotFoundException:
> >/home/arung/testbed/jwsdp1.2/bin/prettyprint.xslt (No such file or
> >directory)
> >at
> >org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transf
> o
> >rmerFactoryImpl.java:805)
> >at
> >com.javector.chap5.sec1.OrderProcessor.OrderProcessor.<clinit>(OrderPro
> c
> >essor.java:32)
> >at java.lang.Class.forName0(Native Method)
> >at java.lang.Class.forName(Class.java:217)
> >at
> >com.sun.xml.rpc.server.http.JAXRPCRuntimeInfoParser.loadClass(JAXRPCRun
> t
> >imeInfoParser.java:150)
> >
> >webapp is trying to look for prettyprint.xslt in the directory where I
> >start my catalina server.
> >
> >-Arun
> >
> >Mark D. Hansen wrote:
> >
> >
> >
> >>Sorry - try this. I removed the file system dependency from the
> >>
> >>
> >service
> >
> >
> >>and rebuilt the war.
> >>
> >>
> >>-----Original Message-----
> >>From: Public discussion on JAX-RPC
> >>[mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM]On Behalf Of Arun Gupta
> >>Sent: Thursday, July 17, 2003 4:33 PM
> >>To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> >>Subject: Re: ServiceFactory.createService() giving
> NullPointerException
> >>
> >>
> >>I'm getting the following server-side exception when
> >>jaxrpc-orderProcessor app is loaded ....
> >>
> >>javax.xml.transform.TransformerConfigurationException:
> >>javax.xml.transform.TransformerConfigurationException:
> >>javax.xml.transform.TransformerException:
> >>
> >>
> >java.io.FileNotFoundException:
> >
> >
> >>/home/arung/testbed/jwsdp1.2/bin/q:/book/src/com/javector/chap5/sec1/O
> r
> >>
> >>
> >d
> >
> >
> >>erProcessor/etc/prettyprint.xslt
> >>(No such file or directory)
> >> at
> >>org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Trans
> f
> >>
> >>
> >o
> >
> >
> >>rmerFactoryImpl.java:805)
> >> at
> >>com.javector.chap5.sec1.OrderProcessor.OrderProcessor.<clinit>(OrderPr
> o
> >>
> >>
> >c
> >
> >
> >>essor.java:31)
> >> at java.lang.Class.forName0(Native Method)
> >> at java.lang.Class.forName(Class.java:217)
> >> at
> >>com.sun.xml.rpc.server.http.JAXRPCRuntimeInfoParser.loadClass(JAXRPCRu
> n
> >>
> >>
> >t
> >
> >
> >>imeInfoParser.java:150)
> >>
> >>and thus I'm not able to view the WSDL in browser. Can you please
> >>provide me a new fixed version of the war ?
> >>
> >>Thanks,
> >>-Arun
> >>
> >>
> >>Mark D. Hansen wrote:
> >>
> >>
> >>
> >>
> >>
> >>>Arun,
> >>>
> >>>I'm using the RI (JWSDP 1.2). Attached is the WAR. Any help you can
> >>>provide is much appreciated.
> >>>
> >>>-- Mark
> >>>
> >>>
> >>>-----Original Message-----
> >>>From: Public discussion on JAX-RPC
> >>>[mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM]On Behalf Of Arun Gupta
> >>>Sent: Thursday, July 17, 2003 2:34 PM
> >>>To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> >>>Subject: Re: ServiceFactory.createService() giving
> >>>
> >>>
> >NullPointerException
> >
> >
> >>>Hi Mark,
> >>>
> >>>I used a WSDL similar to yours and was able to create a Service
> >>>
> >>>
> >>>
> >>>
> >>instance
> >>
> >>
> >>
> >>
> >>>easily. Here is my WSDL excerpt ...
> >>>
> >>> <wsdl:types>
> >>> <xsd:schema targetNamespace="http://hello.org/bp1.1/types">
> >>> <xsd:element name="stringIn" type="xsd:string"/>
> >>> <xsd:element name="stringHeader" type="xsd:string"/>
> >>> <xsd:element name="stringOut" type="xsd:string"/>
> >>> </xsd:schema>
> >>> </wsdl:types>
> >>>
> >>> <wsdl:message name="echoStringInput">
> >>> <wsdl:part name="stringIn" element="types:stringIn"/>
> >>> <wsdl:part name="stringHeader" element="types:stringHeader"/>
> >>> </wsdl:message>
> >>> <wsdl:message name="echoStringOutput">
> >>> <wsdl:part name="stringOut" element="types:stringOut"/>
> >>> </wsdl:message>
> >>> <wsdl:portType name="HelloPortType">
> >>> <wsdl:operation name="echoString">
> >>> <wsdl:input message="tns:echoStringInput"/>
> >>> <wsdl:output message="tns:echoStringOutput"/>
> >>> </wsdl:operation>
> >>> </wsdl:portType>
> >>> <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
> >>> <soap:binding style="document"
> >>>transport="http://schemas.xmlsoap.org/soap/http"/>
> >>> <wsdl:operation name="echoString">
> >>> <soap:operation/>
> >>> <wsdl:input>
> >>> <soap:body parts="stringIn" use="literal"/>
> >>> <soap:header message="tns:echoStringInput"
> >>>part="stringHeader" use="literal"/>
> >>> </wsdl:input>
> >>> <wsdl:output>
> >>> <soap:body use="literal"/>
> >>> </wsdl:output>
> >>> <soap:operation style="document"/>
> >>> </wsdl:operation>
> >>> </wsdl:binding>
> >>>
> >>>The only difference in the WSDL is that message parts in my WSDL are
> >>>simple types, where as you have complex types. I dont think will make
> >>>
> >>>
> >a
> >
> >
> >>>difference though.
> >>>
> >>>Where are you picking JAX-RPC from ?
> >>>
> >>>If you can send me your war file, I can investigate further.
> >>>
> >>>Thanks for your interest in JAX-RPC.
> >>>
> >>>Regards,
> >>>-Arun
> >>>
> >>>Mark D. Hansen wrote:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>Here is the stack trace (sorry).
> >>>>
> >>>>java.lang.NullPointerException
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildDocumentOperation(
> S
> >>>
> >>>
> >e
> >
> >
> >>>
> >>>
> >>r
> >>
> >>
> >>
> >>
> >>>viceInfoBuilder.java:335)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildOperationInfo(Serv
> i
> >>>
> >>>
> >c
> >
> >
> >>>
> >>>
> >>e
> >>
> >>
> >>
> >>
> >>>InfoBuilder.java:185)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildPortInfo(ServiceIn
> f
> >>>
> >>>
> >o
> >
> >
> >>>
> >>>
> >>B
> >>
> >>
> >>
> >>
> >>>uilder.java:171)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>com.sun.xml.rpc.client.dii.ServiceInfoBuilder.buildServiceInfo(Servic
> e
> >>>
> >>>
> >I
> >
> >
> >>>
> >>>
> >>n
> >>
> >>
> >>
> >>
> >>>foBuilder.java:121)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService
> .
> >>>
> >>>
> >j
> >
> >
> >>>
> >>>
> >>a
> >>
> >>
> >>
> >>
> >>>va:58)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>com.sun.xml.rpc.client.dii.ConfiguredService.<init>(ConfiguredService
> .
> >>>
> >>>
> >j
> >
> >
> >>>
> >>>
> >>a
> >>
> >>
> >>
> >>
> >>>va:47)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>com.sun.xml.rpc.client.ServiceFactoryImpl.createService(ServiceFactor
> y
> >>>
> >>>
> >I
> >
> >
> >>>
> >>>
> >>m
> >>
> >>
> >>
> >>
> >>>pl.java:38)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>com.javector.chap5.sec1.OrderProcessor.OrderProcessorClient.<init>(Or
> d
> >>>
> >>>
> >e
> >
> >
> >>>
> >>>
> >>r
> >>
> >>
> >>
> >>
> >>>ProcessorClient.java:93)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>com.javector.chap5.sec1.OrderProcessor.OrderProcessorClient.main(Orde
> r
> >>>
> >>>
> >P
> >
> >
> >>>
> >>>
> >>r
> >>
> >>
> >>
> >>
> >>>ocessorClient.java:137)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> j
> >>>
> >>>
> >a
> >
> >
> >>>
> >>>
> >>v
> >>
> >>
> >>
> >>
> >>>a:39)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> s
> >>>
> >>>
> >o
> >
> >
> >>>
> >>>
> >>r
> >>
> >>
> >>
> >>
> >>>Impl.java:25)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at java.lang.reflect.Method.invoke(Method.java:324)
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:15
> 0
> >>>
> >>>
> >)
> >
> >
> >>>
> >>>
> >>>
> >>>
> >>>> at org.apache.tools.ant.taskdefs.Java.run(Java.java:443)
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
> >>>> at org.apache.tools.ant.Task.perform(Task.java:341)
> >>>> at org.apache.tools.ant.Target.execute(Target.java:309)
> >>>> at org.apache.tools.ant.Target.performTasks(Target.java:336)
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>org.apache.tools.ant.Project.executeTarget(Project.java:1339)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>org.apache.tools.ant.Project.executeTargets(Project.java:1255)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> at org.apache.tools.ant.Main.runBuild(Main.java:609)
> >>>> at org.apache.tools.ant.Main.start(Main.java:196)
> >>>> at org.apache.tools.ant.Main.main(Main.java:235)
> >>>>
> >>>>-----Original Message-----
> >>>>From: Public discussion on JAX-RPC
> >>>>[mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM]On Behalf Of Mark D. Hansen
> >>>>Sent: Thursday, July 17, 2003 1:19 PM
> >>>>To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> >>>>Subject: ServiceFactory.createService() giving NullPointerException
> >>>>
> >>>>
> >>>>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
> >>>=============================================
> >>>
> >>>
> >>>
> >>>
> >>>
> >>--
> >>=============================================
> >>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
> >>=============================================
> >>
> >>
> >>
> >
> >--
> >=============================================
> >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
> >=============================================
> >
>
> --
> =============================================
> 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
> =============================================
>