users@jax-rpc.java.net

Re: Document-Literal Service

From: Anne Thomas Manes <anne_at_MANES.NET>
Date: Fri, 08 Aug 2003 06:58:31 -0400

Your response message uses the wrong namespace prefix for the encodingStyle
attribute. It says:
SOAP-ENC:encodingStyle="http://schemas.xmlsoap.org/soap/envelope/"

It should say:
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/envelope/"

What system have you used to create the service?

Anne

----- Original Message -----
From: "Ravikiran" <venkata-naga.ravikiran_at_SUN.COM>
To: <JAXRPC-INTEREST_at_JAVA.SUN.COM>
Sent: Friday, August 08, 2003 4:19 AM
Subject: Re: Document-Literal Service


> Hi All,
> The following web service fails during invocation using jax-rpc.The SOAP
> req and response seem to be fine .However the jax-rpc deserialization
> fails with the following error
> unexpected encoding style:
> expected=http://schemas.xmlsoap.org/soap/encoding/, actual=
> at
>
com.sun.xml.rpc.encoding.SOAPDeserializationContext.verifyEncodingStyle(SOAP
DeserializationContext.java:160)
> at
>
com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBa
se.java:148)
> at
>
com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(Referenceab
leSerializerImpl.java:141)
> at
>
com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(CallInvoker
Impl.java:225)
> at
> com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:168)
> at
>
com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:64)
> at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:346)
> The WSDL is http://www.zanetti-dev.com/scripts/zpop3ws.exe/wsdl/IZPOP3
>
> The SOAP Request is
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
>
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ans
1:TestLogin
> xmlns:ans1="http://www.zanetti-dev.com/"><AHost
> xsi:type="xsd:string">Test</AHost><AUsername
> xsi:type="xsd:string">Test2</AUsername><APassword
>
xsi:type="xsd:string">Tes2</APassword></ans1:TestLogin></env:Body></env:Enve
lope>
>
> The SOAP Response is :
>
> <?xml version="1.0"?>
>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body
>
SOAP-ENC:encodingStyle="http://schemas.xmlsoap.org/soap/envelope/"><NS1:Test
LoginResponse
> xmlns:NS1="urn:ZPOP3Intf-IZPOP3"><return
>
xsi:type="xsd:boolean">false</return></NS1:TestLoginResponse></SOAP-ENV:Body
></SOAP-ENV:Envelope>
>
> To me, the soap response seems to be fine.However JAX-Rpc throws the
> exception during Deserialization.
> Is this a known issue with Jax-rpc or something else like
> interoperability issue?
>
> Regards,
> Ravikiran.
>
>
> Arun Gupta wrote:
>
> > Here are the steps you can follow ...
> >
> > 1). Code your Java service endpoint interface and implementation
> > 2). Give the command to generate your model file ...
> >
> > wscompile -define -f:documentliteral -model model.gz CONFIG_FILE.xml
> >
> > This will generate the document/literal WSDL for your preview. If you
> > want your WSDL to look different, then you may decide to choose a
> > different set of options or modify your service endpoint interface and
> > implementation.
> > 3). Generate a raw war file (as in the case of starting from a WSDL)
> > consisting of service endpoint interface, implementation, deployment
> > descriptor (jaxrpc-ri.xml) and model file
> > 4). Make sure add the model attribute to the endpoint in the
> > jaxrpc-ri.xml in the war file. In your case it may look like ...
> >
> > <endpoint
> > name="Hello"
> > displayName="Hello Service"
> > description="A simple web service"
> > interface="YOUR_SERVICE_ENDPOINT_INTERFACE"
> > implementation="YOUR_SERVICE_ENDPOINT_IMPLEMENTATION"
> > model="/WEB-INF/model.gz"/>
> >
> >
> > assuming that you store the model.gz in WEB-INF directory the raw war
> > file.
> > 5). Feed this raw war file to wsdeploy as
> > wsdeploy .sh -o COOKED_WAR_FILE.war RAW_WAR_FILE.war
> >
> > This COOKED_WAR_FILE.war is deployable in Tomcat container bundled with
> > JWSDP. Your WSDL (as generated for preview earlier) will be available to
> > you by appending ?WSDL to your endpoint address.
> >
> > Hope that helps clarify the confusion.
> >
> > Regards,
> > -Arun
> >
> >
> > Sam D wrote:
> >
> >> This is all so confusing.
> >>
> >> What I want to do is this.
> >> Start with Java code and deploy a document/literal service.
> >>
> >> Can someone please outline the steps and ant tasks I need ?
> >>
> >> Thanks
> >> =sam
> >>
> >>
> >>
> >> Doug Kohlert wrote:
> >>
> >>
> >>
> >>> Sam,
> >>> First use wscompile with the -f:documentliteral option together
> >>> with the -model option to create a model file. You then can
> >>> add the model to your war file that you pass to wsdeploy and
> >>> all should work. Make sure to add the model attribute to the
> >>> endpoint in the jaxrpc-ri.xml in the war file. Here is a
> >>> sample endpoint.
> >>>
> >>> <endpoint
> >>> name="Hello"
> >>> displayName="Hello Service"
> >>> description="A simple web service"
> >>> interface="stub_tie_generator_test.Hello"
> >>> implementation="stub_tie_generator_test.HelloImpl"
> >>> model="/WEB-INF/model.gz"/>
> >>>
> >>> Sam D wrote:
> >>>
> >>>
> >>>> Hi.
> >>>>
> >>>> How do I do this in JWSDP 1.2 ? There seems to be no option in
> >>>> wsdeploy to
> >>>>
> >>>> tell it how to do it.
> >>>>
> >>>> ( I start with Java code, deploy service and generate WSDL)
> >>>>
> >>>> Thanks
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> Doug Kohlert wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>> Samuel,
> >>>>> The JWSDP 1.1 does not generate document-literal or rpc-literal
> >>>>> WSDLS.
> >>>>> However, JWSDP 1.2 generates both.
> >>>>>
> >>>>> Samuel D Jackson wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Does the JWSDP 1.1 generate WSDL files that are document-literal ?
> >>>>>> Does the JWSDP 1.2 do that ?
> >>>>>>
> >>>>>> Thanks
> >>>>>> =samuel
> >>>>>>
> >>>>>>
> >>>>> --
> >>>>> Doug Kohlert
> >>>>> Java Software Division
> >>>>> Sun Microsystems, Inc.
> >>>>> phone: 503 345-9806
> >>>>>
> >>>>>
> >>> --
> >>> Doug Kohlert
> >>> Java Software Division
> >>> Sun Microsystems, Inc.
> >>> phone: 503 345-9806
> >>>
> >>>
> >
>