You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Rajesh Narayan <na...@gmail.com> on 2006/09/01 11:41:16 UTC

Namespace prefix missing | Axis 1.3 rpc/literal

 Hi All,

I am using Axis 1.3 rpc/literal style for my server and the client trying to
access our webservice is an SAP XI client.

When I send the request:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:readUser xmlns:ns1="urn:OBAWebService" SOAP-ENV:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">
<OBAUserRequestBean xsi:type="ns1:OBAUser">
<errorMessages xmlns:ns2=" http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:Array" ns2:arrayType="xsd:string[]" xsi:null="true"/>
<title xsi:type="xsd:string"></title>
<industrySector xsi:type="xsd:string">VerynewSector</industrySector>
<status xsi:type="xsd:string" xsi:null="true"/>
<roles xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:Array" ns3:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">sap_admin</item>
<item xsi:type="xsd:string">sap_account2</item>
</roles>
<authCode xsi:type="xsd:string"></authCode>
<returnCode xsi:type="xsd:string" xsi:null="true"/>
<newEmail xsi:type="xsd:string" xsi:null="true"/>
<firstName xsi:type="xsd:string"></firstName>
<lastName xsi:type="xsd:string"></lastName>
<segment xsi:type="xsd:string">VerynewSegment</segment>
<email xsi:type="xsd:string"> d7@d.com</email>
</OBAUserRequestBean>
</ns1:readUser>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The response I get is:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema " xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"><http://www.w3.org/2001/XMLSchema-instance%22%3E>
<soapenv:Body>
<readUserResponse xmlns="urn:OBAWebService">
<readUserReturn>
<returnCode>0</returnCode>
<authCode xsi:nil="true"/>
<industrySector>sample_sector</industrySector>
<status>Success</status>
<roles xsi:nil="true"/>
<segment>sample_segment</segment>
<email>d7@d.com</email>
<title>Mr.</title>
<firstName>abra</firstName>
<lastName>Dabra</lastName>
<errorMessages xsi:nil="true"/>
<newEmail xsi:nil="true"/>
</readUserReturn>
</readUserResponse>
</soapenv:Body>
</soapenv:Envelope>

The respons edoes not have a namespace prefix associated with the
readUserResponse node, which is causing problems fro the XI client. Is there
any way we can change some configurations to get around this issue.

Any help would be highly appreciated

Regards,
 Rajesh

Re: Namespace prefix missing | Axis 1.3 rpc/literal

Posted by Rajesh Narayan <na...@gmail.com>.
Thanks a ton Anne for your help. We are planning to switch to
wrapped/literal.

Regards,


On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
>
> I'm sorry -- I meant to say:
>
>         Axis will always generate elementFormDefault="qualified".
>
> On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> > If you are using RPC style, then the auto-generated accessor elements
> > created for each parameter type *must* be unqualified. If you want to
> > change that, you must switch to document style. Axis will always
> > generate elementFormDefault="unqualified".
> >
> > Anne
> >
> > On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
> > >
> > > Thanks Anne for the explanation.
> > >
> > > Another quick query: Is there a way to specify the elementFormDefault
> > > variable explicitly in wsdd? I tried having it as a parameter in
> > > globalConfiguration but it doesn't seem to work. This is what i used:
> > >
> > > <parameter name="elementFormDefault " value="unqualified"/>
> > >
> > > Regards,
> > > Rajesh
> > >
> > >
> > > On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> > > > Actually, in the response, all your child elements are qualified.
> > > > That's the effect of using the default namespace declaration -- all
> > > > child elements are qualified by the default namespace unless
> > > > specifically overrided which another namespace declaration. In other
> > > > words, this:
> > > >
> > > >    <foobar xmlns="urn:foo:bar">
> > > >         <foo>string</foo>
> > > >         <bar>string</bar>
> > > >    </foobar>
> > > >
> > > > is semantically equivalent to this:
> > > >
> > > >    <ns:foobar xmlns:ns="urn:foo:bar">
> > > >         <ns:foo>string</ns:foo>
> > > >         <ns:bar>string</ns:bar>
> > > >    </ns:foobar>
> > > >
> > > > When using the default namepsace, if you want to make child elements
> > > > unqualified, then you must specifically override the default, like
> > > > this:
> > > >
> > > >    <foobar xmlns="urn:foo:bar">
> > > >         <foo xmlns="">string</foo>
> > > >         <barxmlns="">string</bar>
> > > >    </foobar>
> > > >
> > > > See
> > >
> http://atmanes.blogspot.com/2006/07/short-explanation-of-xml-namespaces.html
> > > > for more explanation of namespaces.
> > > >
> > > > In any case, I recommend that you use the Axis "WRAPPED" style. It
> > > > produces document/literal, but you don't need to change your
> service.
> > > >
> > > > Change the <service> definition to:
> > > >     <service name="OBAWebService" provider="java:RPC"
> > > >            style="wrapped" use="literal">
> > > >
> > > > Also change the sendMultiRefs parameter value to "false".
> > > >
> > > > Anne
> > > >
> > > > On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
> > > > >
> > > > > Hi Anne,
> > > > >
> > > > > Thanks a lot for the response.
> > > > >
> > > > > The request that I had attached was a request i had generated
> through a
> > > test
> > > > > harness and hence it is rpc/encoded.
> > > > > The response however has the child elements unqualified.
> > > > >
> > > > > We initially had rpc/encoded but changed to rpc/literal because
> SAP/XI
> > > did
> > > > > not support arrays with sopenc format.
> > > > >
> > > > > One possible solution would be switching to document/literal but
> that
> > > would
> > > > > require considerable amount of changes at the web service end
> > > > >
> > > > > The reason I wanted the prefix was because the SAP/XI client can
> accept
> > > > > similar messages if it's with a prefix.
> > > > >
> > > > > You can have a look at my server-config.wsdd which is attached
> below
> > > > >
> > > > > Thanks Again
> > > > >
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> > > > > xmlns:java="
> > > > > http://xml.apache.org/axis/wsdd/providers/java ">
> > > > >  <globalConfiguration>
> > > > >   <parameter name="sendMultiRefs" value="true"/>
> > > > >   <parameter name="disablePrettyXML" value="true"/>
> > > > >   <parameter name="adminPassword" value="admin"/>
> > > > >   <parameter name="dotNetSoapEncFix" value="true"/>
> > > > >   <parameter name="enableNamespacePrefixOptimization"
> > > > > value="true"/>
> > > > >   <parameter name="sendXMLDeclaration" value="true"/>
> > > > >   <parameter name="attachments.implementation"
> > > > > value="org.apache.axis.attachments.AttachmentsImpl "/>
> > > > >   <parameter name="sendXsiTypes" value="false"/>
> > > > >   <requestFlow>
> > > > >    <handler
> > > > > type="java:org.apache.axis.handlers.JWSHandler">
> > > > >     <parameter name="scope" value="session"/>
> > > > >    </handler>
> > > > >    <handler type="java:
> > > > > org.apache.axis.handlers.JWSHandler">
> > > > >     <parameter name="scope" value="request"/>
> > > > >     <parameter name="extension" value=".jwr"/>
> > > > >    </handler>
> > > > >    </requestFlow>
> > > > >  </globalConfiguration>
> > > > >  <handler name="Authenticate"
> > > > >
> > > type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
> > > > >  <handler name="LocalResponder" type="java:
> > > > > org.apache.axis.transport.local.LocalResponder"/>
> > > > >  <handler name="URLMapper"
> > > > > type="java:org.apache.axis.handlers.http.URLMapper"/>
> > > > >  <service name="AdminService" provider="java:MSG">
> > > > >   <parameter name="allowedMethods" value="AdminService"/>
> > > > >   <parameter name="enableRemoteAdmin" value="false"/>
> > > > >   <parameter name="className" value=" org.apache.axis.utils.Admin
> "/>
> > > > >   <namespace>
> > > http://xml.apache.org/axis/wsdd/</namespace>
> > > > >  </service>
> > > > >  <service name="OBAWebService" provider="java:RPC" style="rpc"
> > > > > use="literal">
> > > > >   <parameter name="allowedMethods"
> > > > > value="createUser,updateProfile,readUser,deleteUser"/>
> > > > >   <parameter name="scope" value="Application"/>
> > > > >   <parameter name="className" value="
> > > > > com.test.webservices.OBAWebService"/>
> > > > >   <typeMapping
> > > > >
> > > deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> > > > > encodingStyle="" qname="ns1:OBAUser"
> > > > >
> > > serializer="org.apache.axis.encoding.ser.BeanSerializerFactory
> > > > > " type="java:com.test.OBAUserBean" xmlns:ns1="urn:OBAWebService"/>
> > > > >   <typeMapping xmlns:ns2="urn:OBAWebService"
> > > qname="ns2:ArrayOf_xsd_string"
> > > > > type="java:java.lang.String []"
> > > > >
> > > serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> > > > >
> > > deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
> > > > > encodingStyle="" />
> > > > >  </service>
> > > > >  <service name="Version" provider="java:RPC">
> > > > >   <parameter name="allowedMethods" value="getVersion"/>
> > > > >   <parameter name="className" value="org.apache.axis.Version"/>
> > > > >  </service>
> > > > >  <transport name="http">
> > > > >   <requestFlow>
> > > > >    <handler type="URLMapper"/>
> > > > >    <handler
> > > > >
> > > type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
> > > > >   </requestFlow>
> > > > >   <parameter name="qs:list" value="
> > > > > org.apache.axis.transport.http.QSListHandler "/>
> > > > >   <parameter name="qs:wsdl"
> > > > > value="org.apache.axis.transport.http.QSWSDLHandler"/>
> > > > >   <parameter name="qs:method" value="
> > > > > org.apache.axis.transport.http.QSMethodHandler "/>
> > > > >  </transport>
> > > > >  <transport name="local">
> > > > >   <responseFlow>
> > > > >    <handler type="LocalResponder"/>
> > > > >   </responseFlow>
> > > > >  </transport>
> > > > > </deployment>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> > > > > >
> > > > > Note the following errors based on your assertion that this is an
> > > > > rpc/literal service:
> > > > >
> > > > >     - The input message is using RPC/encoded, and I'm quite sure
> that
> > > > >       SAP XI does not support RPC literal.
> > > > >     - The child element of the return wrapper element
> (<readUserReturn>)
> > > > >       is qualified, which is inconsistent with RPC/literal -- all
> > > children
> > > > > of
> > > > >       the generated wrapper elements in RPC/literal must be
> unqualified.
> > > > >
> > > > > I seriously doubt that the problem is caused by use of the default
> > > > > namespace instead of a namespace assigned a prefix.
> > > > >
> > > > >     <readUserResponse xmlns="urn:OBAWebService">
> > > > >
> > > > > is semantically identical to
> > > > >
> > > > >     <ns1:readUserResponse xmlns:ns1="urn:OBAWebService">
> > > > >
> > > > > And I'm certain the XI can handle either case.
> > > > >
> > > > > My guess is that your problem is caused by the fact that neither
> XI
> > > > > nor Axis 1.3 supports RPC/literal. You should convert your service
> to
> > > > > either RPC/encoded or document/literal.
> > > > >
> > > > > Anne
> > > > >
> > > > > On 9/1/06, Rajesh Narayan <narayan.rajesh@gmail.com > wrote:
> > > > > >
> > > > > >
> > > > > > Hi All,
> > > > > >
> > > > > > I am using Axis 1.3 rpc/literal style for my server and the
> client
> > > trying
> > > > > to
> > > > > > access our webservice is an SAP XI client.
> > > > > >
> > > > > > When I send the request:
> > > > > >
> > > > > > <?xml version='1.0' encoding='UTF-8'?>
> > > > > > <SOAP-ENV:Envelope
> > > > > >
> > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
> > > > > "
> > > > > > xmlns:xsi="
> > > http://www.w3.org/2001/XMLSchema-instance"
> > > > > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema ">
> > > > > > <SOAP-ENV:Body>
> > > > > > <ns1:readUser xmlns:ns1="urn:OBAWebService"
> SOAP-ENV:encodingStyle="
> > > > > > http://schemas.xmlsoap.org/soap/encoding/ ">
> > > > > > <OBAUserRequestBean xsi:type="ns1:OBAUser">
> > > > > > <errorMessages xmlns:ns2="
> > > > > > http://schemas.xmlsoap.org/soap/encoding/ "
> > > > > > xsi:type="ns2:Array" ns2:arrayType="xsd:string[]"
> xsi:null="true"/>
> > > > > > <title xsi:type="xsd:string"></title>
> > > > > > <industrySector
> > > > > > xsi:type="xsd:string">VerynewSector</industrySector>
> > > > > > <status xsi:type="xsd:string" xsi:null="true"/>
> > > > > > <roles xmlns:ns3="
> > > > > > http://schemas.xmlsoap.org/soap/encoding/ "
> > > > > > xsi:type="ns3:Array" ns3:arrayType="xsd:string[2]">
> > > > > > <item xsi:type="xsd:string">sap_admin</item>
> > > > > > <item xsi:type="xsd:string">sap_account2</item>
> > > > > > </roles>
> > > > > > <authCode xsi:type="xsd:string"></authCode>
> > > > > > <returnCode xsi:type="xsd:string" xsi:null="true"/>
> > > > > > <newEmail xsi:type="xsd:string" xsi:null="true"/>
> > > > > > <firstName xsi:type="xsd:string"></firstName>
> > > > > > <lastName xsi:type="xsd:string"></lastName>
> > > > > > <segment
> > > xsi:type="xsd:string">VerynewSegment</segment>
> > > > > > <email xsi:type="xsd:string"> d7@d.com</email>
> > > > > > </OBAUserRequestBean>
> > > > > > </ns1:readUser>
> > > > > > </SOAP-ENV:Body>
> > > > > > </SOAP-ENV:Envelope>
> > > > > >
> > > > > > The response I get is:
> > > > > >
> > > > > > <?xml version="1.0" encoding="utf-8"?>
> > > > > > <soapenv:Envelope
> > > > > > xmlns:soapenv="
> > > > > http://schemas.xmlsoap.org/soap/envelope/"
> > > > > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
> > > > > xmlns:xsi="
> > > > > > http://www.w3.org/2001/XMLSchema-instance">
> > > > > > <soapenv:Body>
> > > > > > <readUserResponse xmlns="urn:OBAWebService">
> > > > > > <readUserReturn>
> > > > > > <returnCode>0</returnCode>
> > > > > > <authCode xsi:nil="true"/>
> > > > > > <industrySector>sample_sector</industrySector>
> > > > > > <status>Success</status>
> > > > > > <roles xsi:nil="true"/>
> > > > > > <segment>sample_segment</segment>
> > > > > > <email>d7@d.com</email>
> > > > > > <title>Mr.</title>
> > > > > > <firstName>abra</firstName>
> > > > > > <lastName>Dabra</lastName>
> > > > > > <errorMessages xsi:nil="true"/>
> > > > > > <newEmail xsi:nil="true"/>
> > > > > > </readUserReturn>
> > > > > > </readUserResponse>
> > > > > > </soapenv:Body>
> > > > > > </soapenv:Envelope>
> > > > > >
> > > > > > The respons edoes not have a namespace prefix associated with
> the
> > > > > > readUserResponse node, which is causing problems fro the XI
> client. Is
> > > > > there
> > > > > > any way we can change some configurations to get around this
> issue.
> > > > > >
> > > > > > Any help would be highly appreciated
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > >
> > > > > > Rajesh
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Namespace prefix missing | Axis 1.3 rpc/literal

Posted by Anne Thomas Manes <at...@gmail.com>.
I'm sorry -- I meant to say:

         Axis will always generate elementFormDefault="qualified".

On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> If you are using RPC style, then the auto-generated accessor elements
> created for each parameter type *must* be unqualified. If you want to
> change that, you must switch to document style. Axis will always
> generate elementFormDefault="unqualified".
>
> Anne
>
> On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
> >
> > Thanks Anne for the explanation.
> >
> > Another quick query: Is there a way to specify the elementFormDefault
> > variable explicitly in wsdd? I tried having it as a parameter in
> > globalConfiguration but it doesn't seem to work. This is what i used:
> >
> > <parameter name="elementFormDefault " value="unqualified"/>
> >
> > Regards,
> > Rajesh
> >
> >
> > On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> > > Actually, in the response, all your child elements are qualified.
> > > That's the effect of using the default namespace declaration -- all
> > > child elements are qualified by the default namespace unless
> > > specifically overrided which another namespace declaration. In other
> > > words, this:
> > >
> > >    <foobar xmlns="urn:foo:bar">
> > >         <foo>string</foo>
> > >         <bar>string</bar>
> > >    </foobar>
> > >
> > > is semantically equivalent to this:
> > >
> > >    <ns:foobar xmlns:ns="urn:foo:bar">
> > >         <ns:foo>string</ns:foo>
> > >         <ns:bar>string</ns:bar>
> > >    </ns:foobar>
> > >
> > > When using the default namepsace, if you want to make child elements
> > > unqualified, then you must specifically override the default, like
> > > this:
> > >
> > >    <foobar xmlns="urn:foo:bar">
> > >         <foo xmlns="">string</foo>
> > >         <barxmlns="">string</bar>
> > >    </foobar>
> > >
> > > See
> > http://atmanes.blogspot.com/2006/07/short-explanation-of-xml-namespaces.html
> > > for more explanation of namespaces.
> > >
> > > In any case, I recommend that you use the Axis "WRAPPED" style. It
> > > produces document/literal, but you don't need to change your service.
> > >
> > > Change the <service> definition to:
> > >     <service name="OBAWebService" provider="java:RPC"
> > >            style="wrapped" use="literal">
> > >
> > > Also change the sendMultiRefs parameter value to "false".
> > >
> > > Anne
> > >
> > > On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
> > > >
> > > > Hi Anne,
> > > >
> > > > Thanks a lot for the response.
> > > >
> > > > The request that I had attached was a request i had generated through a
> > test
> > > > harness and hence it is rpc/encoded.
> > > > The response however has the child elements unqualified.
> > > >
> > > > We initially had rpc/encoded but changed to rpc/literal because SAP/XI
> > did
> > > > not support arrays with sopenc format.
> > > >
> > > > One possible solution would be switching to document/literal but that
> > would
> > > > require considerable amount of changes at the web service end
> > > >
> > > > The reason I wanted the prefix was because the SAP/XI client can accept
> > > > similar messages if it's with a prefix.
> > > >
> > > > You can have a look at my server-config.wsdd which is attached below
> > > >
> > > > Thanks Again
> > > >
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> > > > xmlns:java="
> > > > http://xml.apache.org/axis/wsdd/providers/java ">
> > > >  <globalConfiguration>
> > > >   <parameter name="sendMultiRefs" value="true"/>
> > > >   <parameter name="disablePrettyXML" value="true"/>
> > > >   <parameter name="adminPassword" value="admin"/>
> > > >   <parameter name="dotNetSoapEncFix" value="true"/>
> > > >   <parameter name="enableNamespacePrefixOptimization"
> > > > value="true"/>
> > > >   <parameter name="sendXMLDeclaration" value="true"/>
> > > >   <parameter name="attachments.implementation"
> > > > value="org.apache.axis.attachments.AttachmentsImpl "/>
> > > >   <parameter name="sendXsiTypes" value="false"/>
> > > >   <requestFlow>
> > > >    <handler
> > > > type="java:org.apache.axis.handlers.JWSHandler">
> > > >     <parameter name="scope" value="session"/>
> > > >    </handler>
> > > >    <handler type="java:
> > > > org.apache.axis.handlers.JWSHandler">
> > > >     <parameter name="scope" value="request"/>
> > > >     <parameter name="extension" value=".jwr"/>
> > > >    </handler>
> > > >    </requestFlow>
> > > >  </globalConfiguration>
> > > >  <handler name="Authenticate"
> > > >
> > type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
> > > >  <handler name="LocalResponder" type="java:
> > > > org.apache.axis.transport.local.LocalResponder"/>
> > > >  <handler name="URLMapper"
> > > > type="java:org.apache.axis.handlers.http.URLMapper"/>
> > > >  <service name="AdminService" provider="java:MSG">
> > > >   <parameter name="allowedMethods" value="AdminService"/>
> > > >   <parameter name="enableRemoteAdmin" value="false"/>
> > > >   <parameter name="className" value=" org.apache.axis.utils.Admin"/>
> > > >   <namespace>
> > http://xml.apache.org/axis/wsdd/</namespace>
> > > >  </service>
> > > >  <service name="OBAWebService" provider="java:RPC" style="rpc"
> > > > use="literal">
> > > >   <parameter name="allowedMethods"
> > > > value="createUser,updateProfile,readUser,deleteUser"/>
> > > >   <parameter name="scope" value="Application"/>
> > > >   <parameter name="className" value="
> > > > com.test.webservices.OBAWebService"/>
> > > >   <typeMapping
> > > >
> > deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> > > > encodingStyle="" qname="ns1:OBAUser"
> > > >
> > serializer="org.apache.axis.encoding.ser.BeanSerializerFactory
> > > > " type="java:com.test.OBAUserBean" xmlns:ns1="urn:OBAWebService"/>
> > > >   <typeMapping xmlns:ns2="urn:OBAWebService"
> > qname="ns2:ArrayOf_xsd_string"
> > > > type="java:java.lang.String []"
> > > >
> > serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> > > >
> > deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
> > > > encodingStyle="" />
> > > >  </service>
> > > >  <service name="Version" provider="java:RPC">
> > > >   <parameter name="allowedMethods" value="getVersion"/>
> > > >   <parameter name="className" value="org.apache.axis.Version"/>
> > > >  </service>
> > > >  <transport name="http">
> > > >   <requestFlow>
> > > >    <handler type="URLMapper"/>
> > > >    <handler
> > > >
> > type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
> > > >   </requestFlow>
> > > >   <parameter name="qs:list" value="
> > > > org.apache.axis.transport.http.QSListHandler "/>
> > > >   <parameter name="qs:wsdl"
> > > > value="org.apache.axis.transport.http.QSWSDLHandler"/>
> > > >   <parameter name="qs:method" value="
> > > > org.apache.axis.transport.http.QSMethodHandler "/>
> > > >  </transport>
> > > >  <transport name="local">
> > > >   <responseFlow>
> > > >    <handler type="LocalResponder"/>
> > > >   </responseFlow>
> > > >  </transport>
> > > > </deployment>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> > > > >
> > > > Note the following errors based on your assertion that this is an
> > > > rpc/literal service:
> > > >
> > > >     - The input message is using RPC/encoded, and I'm quite sure that
> > > >       SAP XI does not support RPC literal.
> > > >     - The child element of the return wrapper element (<readUserReturn>)
> > > >       is qualified, which is inconsistent with RPC/literal -- all
> > children
> > > > of
> > > >       the generated wrapper elements in RPC/literal must be unqualified.
> > > >
> > > > I seriously doubt that the problem is caused by use of the default
> > > > namespace instead of a namespace assigned a prefix.
> > > >
> > > >     <readUserResponse xmlns="urn:OBAWebService">
> > > >
> > > > is semantically identical to
> > > >
> > > >     <ns1:readUserResponse xmlns:ns1="urn:OBAWebService">
> > > >
> > > > And I'm certain the XI can handle either case.
> > > >
> > > > My guess is that your problem is caused by the fact that neither XI
> > > > nor Axis 1.3 supports RPC/literal. You should convert your service to
> > > > either RPC/encoded or document/literal.
> > > >
> > > > Anne
> > > >
> > > > On 9/1/06, Rajesh Narayan <narayan.rajesh@gmail.com > wrote:
> > > > >
> > > > >
> > > > > Hi All,
> > > > >
> > > > > I am using Axis 1.3 rpc/literal style for my server and the client
> > trying
> > > > to
> > > > > access our webservice is an SAP XI client.
> > > > >
> > > > > When I send the request:
> > > > >
> > > > > <?xml version='1.0' encoding='UTF-8'?>
> > > > > <SOAP-ENV:Envelope
> > > > >
> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
> > > > "
> > > > > xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"
> > > > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema ">
> > > > > <SOAP-ENV:Body>
> > > > > <ns1:readUser xmlns:ns1="urn:OBAWebService" SOAP-ENV:encodingStyle="
> > > > > http://schemas.xmlsoap.org/soap/encoding/ ">
> > > > > <OBAUserRequestBean xsi:type="ns1:OBAUser">
> > > > > <errorMessages xmlns:ns2="
> > > > > http://schemas.xmlsoap.org/soap/encoding/ "
> > > > > xsi:type="ns2:Array" ns2:arrayType="xsd:string[]" xsi:null="true"/>
> > > > > <title xsi:type="xsd:string"></title>
> > > > > <industrySector
> > > > > xsi:type="xsd:string">VerynewSector</industrySector>
> > > > > <status xsi:type="xsd:string" xsi:null="true"/>
> > > > > <roles xmlns:ns3="
> > > > > http://schemas.xmlsoap.org/soap/encoding/ "
> > > > > xsi:type="ns3:Array" ns3:arrayType="xsd:string[2]">
> > > > > <item xsi:type="xsd:string">sap_admin</item>
> > > > > <item xsi:type="xsd:string">sap_account2</item>
> > > > > </roles>
> > > > > <authCode xsi:type="xsd:string"></authCode>
> > > > > <returnCode xsi:type="xsd:string" xsi:null="true"/>
> > > > > <newEmail xsi:type="xsd:string" xsi:null="true"/>
> > > > > <firstName xsi:type="xsd:string"></firstName>
> > > > > <lastName xsi:type="xsd:string"></lastName>
> > > > > <segment
> > xsi:type="xsd:string">VerynewSegment</segment>
> > > > > <email xsi:type="xsd:string"> d7@d.com</email>
> > > > > </OBAUserRequestBean>
> > > > > </ns1:readUser>
> > > > > </SOAP-ENV:Body>
> > > > > </SOAP-ENV:Envelope>
> > > > >
> > > > > The response I get is:
> > > > >
> > > > > <?xml version="1.0" encoding="utf-8"?>
> > > > > <soapenv:Envelope
> > > > > xmlns:soapenv="
> > > > http://schemas.xmlsoap.org/soap/envelope/"
> > > > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
> > > > xmlns:xsi="
> > > > > http://www.w3.org/2001/XMLSchema-instance">
> > > > > <soapenv:Body>
> > > > > <readUserResponse xmlns="urn:OBAWebService">
> > > > > <readUserReturn>
> > > > > <returnCode>0</returnCode>
> > > > > <authCode xsi:nil="true"/>
> > > > > <industrySector>sample_sector</industrySector>
> > > > > <status>Success</status>
> > > > > <roles xsi:nil="true"/>
> > > > > <segment>sample_segment</segment>
> > > > > <email>d7@d.com</email>
> > > > > <title>Mr.</title>
> > > > > <firstName>abra</firstName>
> > > > > <lastName>Dabra</lastName>
> > > > > <errorMessages xsi:nil="true"/>
> > > > > <newEmail xsi:nil="true"/>
> > > > > </readUserReturn>
> > > > > </readUserResponse>
> > > > > </soapenv:Body>
> > > > > </soapenv:Envelope>
> > > > >
> > > > > The respons edoes not have a namespace prefix associated with the
> > > > > readUserResponse node, which is causing problems fro the XI client. Is
> > > > there
> > > > > any way we can change some configurations to get around this issue.
> > > > >
> > > > > Any help would be highly appreciated
> > > > >
> > > > > Regards,
> > > > >
> > > > >
> > > > > Rajesh
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Namespace prefix missing | Axis 1.3 rpc/literal

Posted by Anne Thomas Manes <at...@gmail.com>.
If you are using RPC style, then the auto-generated accessor elements
created for each parameter type *must* be unqualified. If you want to
change that, you must switch to document style. Axis will always
generate elementFormDefault="unqualified".

Anne

On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
>
> Thanks Anne for the explanation.
>
> Another quick query: Is there a way to specify the elementFormDefault
> variable explicitly in wsdd? I tried having it as a parameter in
> globalConfiguration but it doesn't seem to work. This is what i used:
>
> <parameter name="elementFormDefault " value="unqualified"/>
>
> Regards,
> Rajesh
>
>
> On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> > Actually, in the response, all your child elements are qualified.
> > That's the effect of using the default namespace declaration -- all
> > child elements are qualified by the default namespace unless
> > specifically overrided which another namespace declaration. In other
> > words, this:
> >
> >    <foobar xmlns="urn:foo:bar">
> >         <foo>string</foo>
> >         <bar>string</bar>
> >    </foobar>
> >
> > is semantically equivalent to this:
> >
> >    <ns:foobar xmlns:ns="urn:foo:bar">
> >         <ns:foo>string</ns:foo>
> >         <ns:bar>string</ns:bar>
> >    </ns:foobar>
> >
> > When using the default namepsace, if you want to make child elements
> > unqualified, then you must specifically override the default, like
> > this:
> >
> >    <foobar xmlns="urn:foo:bar">
> >         <foo xmlns="">string</foo>
> >         <barxmlns="">string</bar>
> >    </foobar>
> >
> > See
> http://atmanes.blogspot.com/2006/07/short-explanation-of-xml-namespaces.html
> > for more explanation of namespaces.
> >
> > In any case, I recommend that you use the Axis "WRAPPED" style. It
> > produces document/literal, but you don't need to change your service.
> >
> > Change the <service> definition to:
> >     <service name="OBAWebService" provider="java:RPC"
> >            style="wrapped" use="literal">
> >
> > Also change the sendMultiRefs parameter value to "false".
> >
> > Anne
> >
> > On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
> > >
> > > Hi Anne,
> > >
> > > Thanks a lot for the response.
> > >
> > > The request that I had attached was a request i had generated through a
> test
> > > harness and hence it is rpc/encoded.
> > > The response however has the child elements unqualified.
> > >
> > > We initially had rpc/encoded but changed to rpc/literal because SAP/XI
> did
> > > not support arrays with sopenc format.
> > >
> > > One possible solution would be switching to document/literal but that
> would
> > > require considerable amount of changes at the web service end
> > >
> > > The reason I wanted the prefix was because the SAP/XI client can accept
> > > similar messages if it's with a prefix.
> > >
> > > You can have a look at my server-config.wsdd which is attached below
> > >
> > > Thanks Again
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> > > xmlns:java="
> > > http://xml.apache.org/axis/wsdd/providers/java ">
> > >  <globalConfiguration>
> > >   <parameter name="sendMultiRefs" value="true"/>
> > >   <parameter name="disablePrettyXML" value="true"/>
> > >   <parameter name="adminPassword" value="admin"/>
> > >   <parameter name="dotNetSoapEncFix" value="true"/>
> > >   <parameter name="enableNamespacePrefixOptimization"
> > > value="true"/>
> > >   <parameter name="sendXMLDeclaration" value="true"/>
> > >   <parameter name="attachments.implementation"
> > > value="org.apache.axis.attachments.AttachmentsImpl "/>
> > >   <parameter name="sendXsiTypes" value="false"/>
> > >   <requestFlow>
> > >    <handler
> > > type="java:org.apache.axis.handlers.JWSHandler">
> > >     <parameter name="scope" value="session"/>
> > >    </handler>
> > >    <handler type="java:
> > > org.apache.axis.handlers.JWSHandler">
> > >     <parameter name="scope" value="request"/>
> > >     <parameter name="extension" value=".jwr"/>
> > >    </handler>
> > >    </requestFlow>
> > >  </globalConfiguration>
> > >  <handler name="Authenticate"
> > >
> type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
> > >  <handler name="LocalResponder" type="java:
> > > org.apache.axis.transport.local.LocalResponder"/>
> > >  <handler name="URLMapper"
> > > type="java:org.apache.axis.handlers.http.URLMapper"/>
> > >  <service name="AdminService" provider="java:MSG">
> > >   <parameter name="allowedMethods" value="AdminService"/>
> > >   <parameter name="enableRemoteAdmin" value="false"/>
> > >   <parameter name="className" value=" org.apache.axis.utils.Admin"/>
> > >   <namespace>
> http://xml.apache.org/axis/wsdd/</namespace>
> > >  </service>
> > >  <service name="OBAWebService" provider="java:RPC" style="rpc"
> > > use="literal">
> > >   <parameter name="allowedMethods"
> > > value="createUser,updateProfile,readUser,deleteUser"/>
> > >   <parameter name="scope" value="Application"/>
> > >   <parameter name="className" value="
> > > com.test.webservices.OBAWebService"/>
> > >   <typeMapping
> > >
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> > > encodingStyle="" qname="ns1:OBAUser"
> > >
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory
> > > " type="java:com.test.OBAUserBean" xmlns:ns1="urn:OBAWebService"/>
> > >   <typeMapping xmlns:ns2="urn:OBAWebService"
> qname="ns2:ArrayOf_xsd_string"
> > > type="java:java.lang.String []"
> > >
> serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> > >
> deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
> > > encodingStyle="" />
> > >  </service>
> > >  <service name="Version" provider="java:RPC">
> > >   <parameter name="allowedMethods" value="getVersion"/>
> > >   <parameter name="className" value="org.apache.axis.Version"/>
> > >  </service>
> > >  <transport name="http">
> > >   <requestFlow>
> > >    <handler type="URLMapper"/>
> > >    <handler
> > >
> type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
> > >   </requestFlow>
> > >   <parameter name="qs:list" value="
> > > org.apache.axis.transport.http.QSListHandler "/>
> > >   <parameter name="qs:wsdl"
> > > value="org.apache.axis.transport.http.QSWSDLHandler"/>
> > >   <parameter name="qs:method" value="
> > > org.apache.axis.transport.http.QSMethodHandler "/>
> > >  </transport>
> > >  <transport name="local">
> > >   <responseFlow>
> > >    <handler type="LocalResponder"/>
> > >   </responseFlow>
> > >  </transport>
> > > </deployment>
> > >
> > >
> > >
> > >
> > >
> > > On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> > > >
> > > Note the following errors based on your assertion that this is an
> > > rpc/literal service:
> > >
> > >     - The input message is using RPC/encoded, and I'm quite sure that
> > >       SAP XI does not support RPC literal.
> > >     - The child element of the return wrapper element (<readUserReturn>)
> > >       is qualified, which is inconsistent with RPC/literal -- all
> children
> > > of
> > >       the generated wrapper elements in RPC/literal must be unqualified.
> > >
> > > I seriously doubt that the problem is caused by use of the default
> > > namespace instead of a namespace assigned a prefix.
> > >
> > >     <readUserResponse xmlns="urn:OBAWebService">
> > >
> > > is semantically identical to
> > >
> > >     <ns1:readUserResponse xmlns:ns1="urn:OBAWebService">
> > >
> > > And I'm certain the XI can handle either case.
> > >
> > > My guess is that your problem is caused by the fact that neither XI
> > > nor Axis 1.3 supports RPC/literal. You should convert your service to
> > > either RPC/encoded or document/literal.
> > >
> > > Anne
> > >
> > > On 9/1/06, Rajesh Narayan <narayan.rajesh@gmail.com > wrote:
> > > >
> > > >
> > > > Hi All,
> > > >
> > > > I am using Axis 1.3 rpc/literal style for my server and the client
> trying
> > > to
> > > > access our webservice is an SAP XI client.
> > > >
> > > > When I send the request:
> > > >
> > > > <?xml version='1.0' encoding='UTF-8'?>
> > > > <SOAP-ENV:Envelope
> > > >
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
> > > "
> > > > xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> > > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema ">
> > > > <SOAP-ENV:Body>
> > > > <ns1:readUser xmlns:ns1="urn:OBAWebService" SOAP-ENV:encodingStyle="
> > > > http://schemas.xmlsoap.org/soap/encoding/ ">
> > > > <OBAUserRequestBean xsi:type="ns1:OBAUser">
> > > > <errorMessages xmlns:ns2="
> > > > http://schemas.xmlsoap.org/soap/encoding/ "
> > > > xsi:type="ns2:Array" ns2:arrayType="xsd:string[]" xsi:null="true"/>
> > > > <title xsi:type="xsd:string"></title>
> > > > <industrySector
> > > > xsi:type="xsd:string">VerynewSector</industrySector>
> > > > <status xsi:type="xsd:string" xsi:null="true"/>
> > > > <roles xmlns:ns3="
> > > > http://schemas.xmlsoap.org/soap/encoding/ "
> > > > xsi:type="ns3:Array" ns3:arrayType="xsd:string[2]">
> > > > <item xsi:type="xsd:string">sap_admin</item>
> > > > <item xsi:type="xsd:string">sap_account2</item>
> > > > </roles>
> > > > <authCode xsi:type="xsd:string"></authCode>
> > > > <returnCode xsi:type="xsd:string" xsi:null="true"/>
> > > > <newEmail xsi:type="xsd:string" xsi:null="true"/>
> > > > <firstName xsi:type="xsd:string"></firstName>
> > > > <lastName xsi:type="xsd:string"></lastName>
> > > > <segment
> xsi:type="xsd:string">VerynewSegment</segment>
> > > > <email xsi:type="xsd:string"> d7@d.com</email>
> > > > </OBAUserRequestBean>
> > > > </ns1:readUser>
> > > > </SOAP-ENV:Body>
> > > > </SOAP-ENV:Envelope>
> > > >
> > > > The response I get is:
> > > >
> > > > <?xml version="1.0" encoding="utf-8"?>
> > > > <soapenv:Envelope
> > > > xmlns:soapenv="
> > > http://schemas.xmlsoap.org/soap/envelope/"
> > > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
> > > xmlns:xsi="
> > > > http://www.w3.org/2001/XMLSchema-instance">
> > > > <soapenv:Body>
> > > > <readUserResponse xmlns="urn:OBAWebService">
> > > > <readUserReturn>
> > > > <returnCode>0</returnCode>
> > > > <authCode xsi:nil="true"/>
> > > > <industrySector>sample_sector</industrySector>
> > > > <status>Success</status>
> > > > <roles xsi:nil="true"/>
> > > > <segment>sample_segment</segment>
> > > > <email>d7@d.com</email>
> > > > <title>Mr.</title>
> > > > <firstName>abra</firstName>
> > > > <lastName>Dabra</lastName>
> > > > <errorMessages xsi:nil="true"/>
> > > > <newEmail xsi:nil="true"/>
> > > > </readUserReturn>
> > > > </readUserResponse>
> > > > </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > > > The respons edoes not have a namespace prefix associated with the
> > > > readUserResponse node, which is causing problems fro the XI client. Is
> > > there
> > > > any way we can change some configurations to get around this issue.
> > > >
> > > > Any help would be highly appreciated
> > > >
> > > > Regards,
> > > >
> > > >
> > > > Rajesh
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Namespace prefix missing | Axis 1.3 rpc/literal

Posted by Rajesh Narayan <na...@gmail.com>.
Thanks Anne for the explanation.

Another quick query: Is there a way to specify the elementFormDefault
variable explicitly in wsdd? I tried having it as a parameter in
globalConfiguration but it doesn't seem to work. This is what i used:

<parameter name="elementFormDefault " value="unqualified"/>

Regards,
Rajesh

On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
>
> Actually, in the response, all your child elements are qualified.
> That's the effect of using the default namespace declaration -- all
> child elements are qualified by the default namespace unless
> specifically overrided which another namespace declaration. In other
> words, this:
>
>    <foobar xmlns="urn:foo:bar">
>         <foo>string</foo>
>         <bar>string</bar>
>    </foobar>
>
> is semantically equivalent to this:
>
>    <ns:foobar xmlns:ns="urn:foo:bar">
>         <ns:foo>string</ns:foo>
>         <ns:bar>string</ns:bar>
>    </ns:foobar>
>
> When using the default namepsace, if you want to make child elements
> unqualified, then you must specifically override the default, like
> this:
>
>    <foobar xmlns="urn:foo:bar">
>         <foo xmlns="">string</foo>
>         <barxmlns="">string</bar>
>    </foobar>
>
> See
> http://atmanes.blogspot.com/2006/07/short-explanation-of-xml-namespaces.html
> for more explanation of namespaces.
>
> In any case, I recommend that you use the Axis "WRAPPED" style. It
> produces document/literal, but you don't need to change your service.
>
> Change the <service> definition to:
>     <service name="OBAWebService" provider="java:RPC"
>            style="wrapped" use="literal">
>
> Also change the sendMultiRefs parameter value to "false".
>
> Anne
>
> On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
> >
> > Hi Anne,
> >
> > Thanks a lot for the response.
> >
> > The request that I had attached was a request i had generated through a
> test
> > harness and hence it is rpc/encoded.
> > The response however has the child elements unqualified.
> >
> > We initially had rpc/encoded but changed to rpc/literal because SAP/XI
> did
> > not support arrays with sopenc format.
> >
> > One possible solution would be switching to document/literal but that
> would
> > require considerable amount of changes at the web service end
> >
> > The reason I wanted the prefix was because the SAP/XI client can accept
> > similar messages if it's with a prefix.
> >
> > You can have a look at my server-config.wsdd which is attached below
> >
> > Thanks Again
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> > xmlns:java="
> > http://xml.apache.org/axis/wsdd/providers/java">
> >  <globalConfiguration>
> >   <parameter name="sendMultiRefs" value="true"/>
> >   <parameter name="disablePrettyXML" value="true"/>
> >   <parameter name="adminPassword" value="admin"/>
> >   <parameter name="dotNetSoapEncFix" value="true"/>
> >   <parameter name="enableNamespacePrefixOptimization"
> > value="true"/>
> >   <parameter name="sendXMLDeclaration" value="true"/>
> >   <parameter name="attachments.implementation"
> > value="org.apache.axis.attachments.AttachmentsImpl"/>
> >   <parameter name="sendXsiTypes" value="false"/>
> >   <requestFlow>
> >    <handler
> > type="java:org.apache.axis.handlers.JWSHandler">
> >     <parameter name="scope" value="session"/>
> >    </handler>
> >    <handler type="java:
> > org.apache.axis.handlers.JWSHandler">
> >     <parameter name="scope" value="request"/>
> >     <parameter name="extension" value=".jwr"/>
> >    </handler>
> >    </requestFlow>
> >  </globalConfiguration>
> >  <handler name="Authenticate"
> > type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
> >  <handler name="LocalResponder" type="java:
> > org.apache.axis.transport.local.LocalResponder"/>
> >  <handler name="URLMapper"
> > type="java:org.apache.axis.handlers.http.URLMapper"/>
> >  <service name="AdminService" provider="java:MSG">
> >   <parameter name="allowedMethods" value="AdminService"/>
> >   <parameter name="enableRemoteAdmin" value="false"/>
> >   <parameter name="className" value=" org.apache.axis.utils.Admin"/>
> >   <namespace>http://xml.apache.org/axis/wsdd/</namespace>
> >  </service>
> >  <service name="OBAWebService" provider="java:RPC" style="rpc"
> > use="literal">
> >   <parameter name="allowedMethods"
> > value="createUser,updateProfile,readUser,deleteUser"/>
> >   <parameter name="scope" value="Application"/>
> >   <parameter name="className" value="
> > com.test.webservices.OBAWebService"/>
> >   <typeMapping
> > deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> > encodingStyle="" qname="ns1:OBAUser"
> > serializer="org.apache.axis.encoding.ser.BeanSerializerFactory
> > " type="java:com.test.OBAUserBean" xmlns:ns1="urn:OBAWebService"/>
> >   <typeMapping xmlns:ns2="urn:OBAWebService"
> qname="ns2:ArrayOf_xsd_string"
> > type="java:java.lang.String []"
> > serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> > deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
> > encodingStyle="" />
> >  </service>
> >  <service name="Version" provider="java:RPC">
> >   <parameter name="allowedMethods" value="getVersion"/>
> >   <parameter name="className" value="org.apache.axis.Version"/>
> >  </service>
> >  <transport name="http">
> >   <requestFlow>
> >    <handler type="URLMapper"/>
> >    <handler
> > type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
> >   </requestFlow>
> >   <parameter name="qs:list" value="
> > org.apache.axis.transport.http.QSListHandler"/>
> >   <parameter name="qs:wsdl"
> > value="org.apache.axis.transport.http.QSWSDLHandler"/>
> >   <parameter name="qs:method" value="
> > org.apache.axis.transport.http.QSMethodHandler"/>
> >  </transport>
> >  <transport name="local">
> >   <responseFlow>
> >    <handler type="LocalResponder"/>
> >   </responseFlow>
> >  </transport>
> > </deployment>
> >
> >
> >
> >
> >
> > On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> > >
> > Note the following errors based on your assertion that this is an
> > rpc/literal service:
> >
> >     - The input message is using RPC/encoded, and I'm quite sure that
> >       SAP XI does not support RPC literal.
> >     - The child element of the return wrapper element (<readUserReturn>)
> >       is qualified, which is inconsistent with RPC/literal -- all
> children
> > of
> >       the generated wrapper elements in RPC/literal must be unqualified.
> >
> > I seriously doubt that the problem is caused by use of the default
> > namespace instead of a namespace assigned a prefix.
> >
> >     <readUserResponse xmlns="urn:OBAWebService">
> >
> > is semantically identical to
> >
> >     <ns1:readUserResponse xmlns:ns1="urn:OBAWebService">
> >
> > And I'm certain the XI can handle either case.
> >
> > My guess is that your problem is caused by the fact that neither XI
> > nor Axis 1.3 supports RPC/literal. You should convert your service to
> > either RPC/encoded or document/literal.
> >
> > Anne
> >
> > On 9/1/06, Rajesh Narayan <narayan.rajesh@gmail.com > wrote:
> > >
> > >
> > > Hi All,
> > >
> > > I am using Axis 1.3 rpc/literal style for my server and the client
> trying
> > to
> > > access our webservice is an SAP XI client.
> > >
> > > When I send the request:
> > >
> > > <?xml version='1.0' encoding='UTF-8'?>
> > > <SOAP-ENV:Envelope
> > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
> > "
> > > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema ">
> > > <SOAP-ENV:Body>
> > > <ns1:readUser xmlns:ns1="urn:OBAWebService" SOAP-ENV:encodingStyle="
> > > http://schemas.xmlsoap.org/soap/encoding/ ">
> > > <OBAUserRequestBean xsi:type="ns1:OBAUser">
> > > <errorMessages xmlns:ns2="
> > > http://schemas.xmlsoap.org/soap/encoding/ "
> > > xsi:type="ns2:Array" ns2:arrayType="xsd:string[]" xsi:null="true"/>
> > > <title xsi:type="xsd:string"></title>
> > > <industrySector
> > > xsi:type="xsd:string">VerynewSector</industrySector>
> > > <status xsi:type="xsd:string" xsi:null="true"/>
> > > <roles xmlns:ns3="
> > > http://schemas.xmlsoap.org/soap/encoding/ "
> > > xsi:type="ns3:Array" ns3:arrayType="xsd:string[2]">
> > > <item xsi:type="xsd:string">sap_admin</item>
> > > <item xsi:type="xsd:string">sap_account2</item>
> > > </roles>
> > > <authCode xsi:type="xsd:string"></authCode>
> > > <returnCode xsi:type="xsd:string" xsi:null="true"/>
> > > <newEmail xsi:type="xsd:string" xsi:null="true"/>
> > > <firstName xsi:type="xsd:string"></firstName>
> > > <lastName xsi:type="xsd:string"></lastName>
> > > <segment xsi:type="xsd:string">VerynewSegment</segment>
> > > <email xsi:type="xsd:string"> d7@d.com</email>
> > > </OBAUserRequestBean>
> > > </ns1:readUser>
> > > </SOAP-ENV:Body>
> > > </SOAP-ENV:Envelope>
> > >
> > > The response I get is:
> > >
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <soapenv:Envelope
> > > xmlns:soapenv="
> > http://schemas.xmlsoap.org/soap/envelope/"
> > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
> > xmlns:xsi="
> > > http://www.w3.org/2001/XMLSchema-instance">
> > > <soapenv:Body>
> > > <readUserResponse xmlns="urn:OBAWebService">
> > > <readUserReturn>
> > > <returnCode>0</returnCode>
> > > <authCode xsi:nil="true"/>
> > > <industrySector>sample_sector</industrySector>
> > > <status>Success</status>
> > > <roles xsi:nil="true"/>
> > > <segment>sample_segment</segment>
> > > <email>d7@d.com</email>
> > > <title>Mr.</title>
> > > <firstName>abra</firstName>
> > > <lastName>Dabra</lastName>
> > > <errorMessages xsi:nil="true"/>
> > > <newEmail xsi:nil="true"/>
> > > </readUserReturn>
> > > </readUserResponse>
> > > </soapenv:Body>
> > > </soapenv:Envelope>
> > >
> > > The respons edoes not have a namespace prefix associated with the
> > > readUserResponse node, which is causing problems fro the XI client. Is
> > there
> > > any way we can change some configurations to get around this issue.
> > >
> > > Any help would be highly appreciated
> > >
> > > Regards,
> > >
> > >
> > > Rajesh
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Namespace prefix missing | Axis 1.3 rpc/literal

Posted by Anne Thomas Manes <at...@gmail.com>.
Actually, in the response, all your child elements are qualified.
That's the effect of using the default namespace declaration -- all
child elements are qualified by the default namespace unless
specifically overrided which another namespace declaration. In other
words, this:

    <foobar xmlns="urn:foo:bar">
         <foo>string</foo>
         <bar>string</bar>
    </foobar>

is semantically equivalent to this:

    <ns:foobar xmlns:ns="urn:foo:bar">
         <ns:foo>string</ns:foo>
         <ns:bar>string</ns:bar>
    </ns:foobar>

When using the default namepsace, if you want to make child elements
unqualified, then you must specifically override the default, like
this:

    <foobar xmlns="urn:foo:bar">
         <foo xmlns="">string</foo>
         <barxmlns="">string</bar>
    </foobar>

See http://atmanes.blogspot.com/2006/07/short-explanation-of-xml-namespaces.html
for more explanation of namespaces.

In any case, I recommend that you use the Axis "WRAPPED" style. It
produces document/literal, but you don't need to change your service.

Change the <service> definition to:
     <service name="OBAWebService" provider="java:RPC"
            style="wrapped" use="literal">

Also change the sendMultiRefs parameter value to "false".

Anne

On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
>
> Hi Anne,
>
> Thanks a lot for the response.
>
> The request that I had attached was a request i had generated through a test
> harness and hence it is rpc/encoded.
> The response however has the child elements unqualified.
>
> We initially had rpc/encoded but changed to rpc/literal because SAP/XI did
> not support arrays with sopenc format.
>
> One possible solution would be switching to document/literal but that would
> require considerable amount of changes at the web service end
>
> The reason I wanted the prefix was because the SAP/XI client can accept
> similar messages if it's with a prefix.
>
> You can have a look at my server-config.wsdd which is attached below
>
> Thanks Again
>
> <?xml version="1.0" encoding="UTF-8"?>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"
> xmlns:java="
> http://xml.apache.org/axis/wsdd/providers/java">
>  <globalConfiguration>
>   <parameter name="sendMultiRefs" value="true"/>
>   <parameter name="disablePrettyXML" value="true"/>
>   <parameter name="adminPassword" value="admin"/>
>   <parameter name="dotNetSoapEncFix" value="true"/>
>   <parameter name="enableNamespacePrefixOptimization"
> value="true"/>
>   <parameter name="sendXMLDeclaration" value="true"/>
>   <parameter name="attachments.implementation"
> value="org.apache.axis.attachments.AttachmentsImpl"/>
>   <parameter name="sendXsiTypes" value="false"/>
>   <requestFlow>
>    <handler
> type="java:org.apache.axis.handlers.JWSHandler">
>     <parameter name="scope" value="session"/>
>    </handler>
>    <handler type="java:
> org.apache.axis.handlers.JWSHandler">
>     <parameter name="scope" value="request"/>
>     <parameter name="extension" value=".jwr"/>
>    </handler>
>    </requestFlow>
>  </globalConfiguration>
>  <handler name="Authenticate"
> type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
>  <handler name="LocalResponder" type="java:
> org.apache.axis.transport.local.LocalResponder"/>
>  <handler name="URLMapper"
> type="java:org.apache.axis.handlers.http.URLMapper"/>
>  <service name="AdminService" provider="java:MSG">
>   <parameter name="allowedMethods" value="AdminService"/>
>   <parameter name="enableRemoteAdmin" value="false"/>
>   <parameter name="className" value=" org.apache.axis.utils.Admin"/>
>   <namespace>http://xml.apache.org/axis/wsdd/</namespace>
>  </service>
>  <service name="OBAWebService" provider="java:RPC" style="rpc"
> use="literal">
>   <parameter name="allowedMethods"
> value="createUser,updateProfile,readUser,deleteUser"/>
>   <parameter name="scope" value="Application"/>
>   <parameter name="className" value="
> com.test.webservices.OBAWebService"/>
>   <typeMapping
> deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> encodingStyle="" qname="ns1:OBAUser"
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory
> " type="java:com.test.OBAUserBean" xmlns:ns1="urn:OBAWebService"/>
>   <typeMapping xmlns:ns2="urn:OBAWebService" qname="ns2:ArrayOf_xsd_string"
> type="java:java.lang.String []"
> serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
> deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
> encodingStyle="" />
>  </service>
>  <service name="Version" provider="java:RPC">
>   <parameter name="allowedMethods" value="getVersion"/>
>   <parameter name="className" value="org.apache.axis.Version"/>
>  </service>
>  <transport name="http">
>   <requestFlow>
>    <handler type="URLMapper"/>
>    <handler
> type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
>   </requestFlow>
>   <parameter name="qs:list" value="
> org.apache.axis.transport.http.QSListHandler"/>
>   <parameter name="qs:wsdl"
> value="org.apache.axis.transport.http.QSWSDLHandler"/>
>   <parameter name="qs:method" value="
> org.apache.axis.transport.http.QSMethodHandler"/>
>  </transport>
>  <transport name="local">
>   <responseFlow>
>    <handler type="LocalResponder"/>
>   </responseFlow>
>  </transport>
> </deployment>
>
>
>
>
>
> On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> >
> Note the following errors based on your assertion that this is an
> rpc/literal service:
>
>     - The input message is using RPC/encoded, and I'm quite sure that
>       SAP XI does not support RPC literal.
>     - The child element of the return wrapper element (<readUserReturn>)
>       is qualified, which is inconsistent with RPC/literal -- all children
> of
>       the generated wrapper elements in RPC/literal must be unqualified.
>
> I seriously doubt that the problem is caused by use of the default
> namespace instead of a namespace assigned a prefix.
>
>     <readUserResponse xmlns="urn:OBAWebService">
>
> is semantically identical to
>
>     <ns1:readUserResponse xmlns:ns1="urn:OBAWebService">
>
> And I'm certain the XI can handle either case.
>
> My guess is that your problem is caused by the fact that neither XI
> nor Axis 1.3 supports RPC/literal. You should convert your service to
> either RPC/encoded or document/literal.
>
> Anne
>
> On 9/1/06, Rajesh Narayan <narayan.rajesh@gmail.com > wrote:
> >
> >
> > Hi All,
> >
> > I am using Axis 1.3 rpc/literal style for my server and the client trying
> to
> > access our webservice is an SAP XI client.
> >
> > When I send the request:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <SOAP-ENV:Envelope
> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
> "
> > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd=" http://www.w3.org/2001/XMLSchema ">
> > <SOAP-ENV:Body>
> > <ns1:readUser xmlns:ns1="urn:OBAWebService" SOAP-ENV:encodingStyle="
> > http://schemas.xmlsoap.org/soap/encoding/ ">
> > <OBAUserRequestBean xsi:type="ns1:OBAUser">
> > <errorMessages xmlns:ns2="
> > http://schemas.xmlsoap.org/soap/encoding/ "
> > xsi:type="ns2:Array" ns2:arrayType="xsd:string[]" xsi:null="true"/>
> > <title xsi:type="xsd:string"></title>
> > <industrySector
> > xsi:type="xsd:string">VerynewSector</industrySector>
> > <status xsi:type="xsd:string" xsi:null="true"/>
> > <roles xmlns:ns3="
> > http://schemas.xmlsoap.org/soap/encoding/ "
> > xsi:type="ns3:Array" ns3:arrayType="xsd:string[2]">
> > <item xsi:type="xsd:string">sap_admin</item>
> > <item xsi:type="xsd:string">sap_account2</item>
> > </roles>
> > <authCode xsi:type="xsd:string"></authCode>
> > <returnCode xsi:type="xsd:string" xsi:null="true"/>
> > <newEmail xsi:type="xsd:string" xsi:null="true"/>
> > <firstName xsi:type="xsd:string"></firstName>
> > <lastName xsi:type="xsd:string"></lastName>
> > <segment xsi:type="xsd:string">VerynewSegment</segment>
> > <email xsi:type="xsd:string"> d7@d.com</email>
> > </OBAUserRequestBean>
> > </ns1:readUser>
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> >
> > The response I get is:
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <soapenv:Envelope
> > xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsd=" http://www.w3.org/2001/XMLSchema "
> xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body>
> > <readUserResponse xmlns="urn:OBAWebService">
> > <readUserReturn>
> > <returnCode>0</returnCode>
> > <authCode xsi:nil="true"/>
> > <industrySector>sample_sector</industrySector>
> > <status>Success</status>
> > <roles xsi:nil="true"/>
> > <segment>sample_segment</segment>
> > <email>d7@d.com</email>
> > <title>Mr.</title>
> > <firstName>abra</firstName>
> > <lastName>Dabra</lastName>
> > <errorMessages xsi:nil="true"/>
> > <newEmail xsi:nil="true"/>
> > </readUserReturn>
> > </readUserResponse>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > The respons edoes not have a namespace prefix associated with the
> > readUserResponse node, which is causing problems fro the XI client. Is
> there
> > any way we can change some configurations to get around this issue.
> >
> > Any help would be highly appreciated
> >
> > Regards,
> >
> >
> > Rajesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Namespace prefix missing | Axis 1.3 rpc/literal

Posted by Rajesh Narayan <na...@gmail.com>.
Hi Anne,

Thanks a lot for the response.

The request that I had attached was a request i had generated through a test
harness and hence it is rpc/encoded. The response however has the child
elements unqualified.

We initially had rpc/encoded but changed to rpc/literal because SAP/XI did
not support arrays with sopenc format.

One possible solution would be switching to document/literal but that would
require considerable amount of changes at the web service end

The reason I wanted the prefix was because the SAP/XI client can accept
similar messages if it's with a prefix.

You can have a look at my server-config.wsdd which is attached below

Thanks Again

<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="
http://xml.apache.org/axis/wsdd/providers/java">
 <globalConfiguration>
  <parameter name="sendMultiRefs" value="true"/>
  <parameter name="disablePrettyXML" value="true"/>
  <parameter name="adminPassword" value="admin"/>
  <parameter name="dotNetSoapEncFix" value="true"/>
  <parameter name="enableNamespacePrefixOptimization" value="true"/>
  <parameter name="sendXMLDeclaration" value="true"/>
  <parameter name="attachments.implementation" value="
org.apache.axis.attachments.AttachmentsImpl"/>
  <parameter name="sendXsiTypes" value="false"/>
  <requestFlow>
   <handler type="java:org.apache.axis.handlers.JWSHandler">
    <parameter name="scope" value="session"/>
   </handler>
   <handler type="java:org.apache.axis.handlers.JWSHandler">
    <parameter name="scope" value="request"/>
    <parameter name="extension" value=".jwr"/>
   </handler>
  </requestFlow>
 </globalConfiguration>
 <handler name="Authenticate" type="java:
org.apache.axis.handlers.SimpleAuthenticationHandler"/>
 <handler name="LocalResponder" type="java:
org.apache.axis.transport.local.LocalResponder"/>
 <handler name="URLMapper" type="java:
org.apache.axis.handlers.http.URLMapper"/>
 <service name="AdminService" provider="java:MSG">
  <parameter name="allowedMethods" value="AdminService"/>
  <parameter name="enableRemoteAdmin" value="false"/>
  <parameter name="className" value="org.apache.axis.utils.Admin"/>
  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
 </service>
 <service name="OBAWebService" provider="java:RPC" style="rpc"
use="literal">
  <parameter name="allowedMethods"
value="createUser,updateProfile,readUser,deleteUser"/>
  <parameter name="scope" value="Application"/>
  <parameter name="className" value="com.test.webservices.OBAWebService"/>
  <typeMapping deserializer="
org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle=""
qname="ns1:OBAUser" serializer="
org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:
com.test.OBAUserBean" xmlns:ns1="urn:OBAWebService"/>
  <typeMapping xmlns:ns2="urn:OBAWebService" qname="ns2:ArrayOf_xsd_string"
type="java:java.lang.String[]" serializer="
org.apache.axis.encoding.ser.ArraySerializerFactory" deserializer="
org.apache.axis.encoding.ser.ArrayDeserializerFactory" encodingStyle="" />
 </service>
 <service name="Version" provider="java:RPC">
  <parameter name="allowedMethods" value="getVersion"/>
  <parameter name="className" value="org.apache.axis.Version"/>
 </service>
 <transport name="http">
  <requestFlow>
   <handler type="URLMapper"/>
   <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
  </requestFlow>
  <parameter name="qs:list" value="
org.apache.axis.transport.http.QSListHandler"/>
  <parameter name="qs:wsdl" value="
org.apache.axis.transport.http.QSWSDLHandler"/>
  <parameter name="qs:method" value="
org.apache.axis.transport.http.QSMethodHandler"/>
 </transport>
 <transport name="local">
  <responseFlow>
   <handler type="LocalResponder"/>
  </responseFlow>
 </transport>
</deployment>





On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
>
> Note the following errors based on your assertion that this is an
> rpc/literal service:
>
>     - The input message is using RPC/encoded, and I'm quite sure that
>       SAP XI does not support RPC literal.
>     - The child element of the return wrapper element (<readUserReturn>)
>       is qualified, which is inconsistent with RPC/literal -- all children
> of
>       the generated wrapper elements in RPC/literal must be unqualified.
>
> I seriously doubt that the problem is caused by use of the default
> namespace instead of a namespace assigned a prefix.
>
>     <readUserResponse xmlns="urn:OBAWebService">
>
> is semantically identical to
>
>     <ns1:readUserResponse xmlns:ns1="urn:OBAWebService">
>
> And I'm certain the XI can handle either case.
>
> My guess is that your problem is caused by the fact that neither XI
> nor Axis 1.3 supports RPC/literal. You should convert your service to
> either RPC/encoded or document/literal.
>
> Anne
>
> On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
> >
> >
> > Hi All,
> >
> > I am using Axis 1.3 rpc/literal style for my server and the client
> trying to
> > access our webservice is an SAP XI client.
> >
> > When I send the request:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <SOAP-ENV:Envelope
> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ "
> > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
> > <SOAP-ENV:Body>
> > <ns1:readUser xmlns:ns1="urn:OBAWebService" SOAP-ENV:encodingStyle="
> > http://schemas.xmlsoap.org/soap/encoding/">
> > <OBAUserRequestBean xsi:type="ns1:OBAUser">
> > <errorMessages xmlns:ns2="
> > http://schemas.xmlsoap.org/soap/encoding/"
> > xsi:type="ns2:Array" ns2:arrayType="xsd:string[]" xsi:null="true"/>
> > <title xsi:type="xsd:string"></title>
> > <industrySector
> > xsi:type="xsd:string">VerynewSector</industrySector>
> > <status xsi:type="xsd:string" xsi:null="true"/>
> > <roles xmlns:ns3="
> > http://schemas.xmlsoap.org/soap/encoding/"
> > xsi:type="ns3:Array" ns3:arrayType="xsd:string[2]">
> > <item xsi:type="xsd:string">sap_admin</item>
> > <item xsi:type="xsd:string">sap_account2</item>
> > </roles>
> > <authCode xsi:type="xsd:string"></authCode>
> > <returnCode xsi:type="xsd:string" xsi:null="true"/>
> > <newEmail xsi:type="xsd:string" xsi:null="true"/>
> > <firstName xsi:type="xsd:string"></firstName>
> > <lastName xsi:type="xsd:string"></lastName>
> > <segment xsi:type="xsd:string">VerynewSegment</segment>
> > <email xsi:type="xsd:string"> d7@d.com</email>
> > </OBAUserRequestBean>
> > </ns1:readUser>
> > </SOAP-ENV:Body>
> > </SOAP-ENV:Envelope>
> >
> > The response I get is:
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsd=" http://www.w3.org/2001/XMLSchema " xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance">
> > <soapenv:Body>
> > <readUserResponse xmlns="urn:OBAWebService">
> > <readUserReturn>
> > <returnCode>0</returnCode>
> > <authCode xsi:nil="true"/>
> > <industrySector>sample_sector</industrySector>
> > <status>Success</status>
> > <roles xsi:nil="true"/>
> > <segment>sample_segment</segment>
> > <email>d7@d.com</email>
> > <title>Mr.</title>
> > <firstName>abra</firstName>
> > <lastName>Dabra</lastName>
> > <errorMessages xsi:nil="true"/>
> > <newEmail xsi:nil="true"/>
> > </readUserReturn>
> > </readUserResponse>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > The respons edoes not have a namespace prefix associated with the
> > readUserResponse node, which is causing problems fro the XI client. Is
> there
> > any way we can change some configurations to get around this issue.
> >
> > Any help would be highly appreciated
> >
> > Regards,
> >
> >
> > Rajesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: Namespace prefix missing | Axis 1.3 rpc/literal

Posted by Anne Thomas Manes <at...@gmail.com>.
Note the following errors based on your assertion that this is an
rpc/literal service:

     - The input message is using RPC/encoded, and I'm quite sure that
       SAP XI does not support RPC literal.
     - The child element of the return wrapper element (<readUserReturn>)
       is qualified, which is inconsistent with RPC/literal -- all children of
       the generated wrapper elements in RPC/literal must be unqualified.

I seriously doubt that the problem is caused by use of the default
namespace instead of a namespace assigned a prefix.

     <readUserResponse xmlns="urn:OBAWebService">

is semantically identical to

     <ns1:readUserResponse xmlns:ns1="urn:OBAWebService">

And I'm certain the XI can handle either case.

My guess is that your problem is caused by the fact that neither XI
nor Axis 1.3 supports RPC/literal. You should convert your service to
either RPC/encoded or document/literal.

Anne

On 9/1/06, Rajesh Narayan <na...@gmail.com> wrote:
>
>
> Hi All,
>
> I am using Axis 1.3 rpc/literal style for my server and the client trying to
> access our webservice is an SAP XI client.
>
> When I send the request:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ "
> xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:readUser xmlns:ns1="urn:OBAWebService" SOAP-ENV:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/">
> <OBAUserRequestBean xsi:type="ns1:OBAUser">
> <errorMessages xmlns:ns2="
> http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns2:Array" ns2:arrayType="xsd:string[]" xsi:null="true"/>
> <title xsi:type="xsd:string"></title>
> <industrySector
> xsi:type="xsd:string">VerynewSector</industrySector>
> <status xsi:type="xsd:string" xsi:null="true"/>
> <roles xmlns:ns3="
> http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns3:Array" ns3:arrayType="xsd:string[2]">
> <item xsi:type="xsd:string">sap_admin</item>
> <item xsi:type="xsd:string">sap_account2</item>
> </roles>
> <authCode xsi:type="xsd:string"></authCode>
> <returnCode xsi:type="xsd:string" xsi:null="true"/>
> <newEmail xsi:type="xsd:string" xsi:null="true"/>
> <firstName xsi:type="xsd:string"></firstName>
> <lastName xsi:type="xsd:string"></lastName>
> <segment xsi:type="xsd:string">VerynewSegment</segment>
> <email xsi:type="xsd:string"> d7@d.com</email>
> </OBAUserRequestBean>
> </ns1:readUser>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> The response I get is:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd=" http://www.w3.org/2001/XMLSchema " xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <readUserResponse xmlns="urn:OBAWebService">
> <readUserReturn>
> <returnCode>0</returnCode>
> <authCode xsi:nil="true"/>
> <industrySector>sample_sector</industrySector>
> <status>Success</status>
> <roles xsi:nil="true"/>
> <segment>sample_segment</segment>
> <email>d7@d.com</email>
> <title>Mr.</title>
> <firstName>abra</firstName>
> <lastName>Dabra</lastName>
> <errorMessages xsi:nil="true"/>
> <newEmail xsi:nil="true"/>
> </readUserReturn>
> </readUserResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> The respons edoes not have a namespace prefix associated with the
> readUserResponse node, which is causing problems fro the XI client. Is there
> any way we can change some configurations to get around this issue.
>
> Any help would be highly appreciated
>
> Regards,
>
>
> Rajesh

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org