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 aaa aaa <ka...@gmail.com> on 2010/04/19 18:10:49 UTC

Trouble moving technical namespaces declaration from soapenv:envelope to business part of soap messages.

Hello,

I'm working on integration of a webservice, running under Axis1 v1.4. It is
actually working quite fine, handling SOAP requests and responding valide
SOAP response.

I still do have trouble with a SOAP client based on Biztalk. This client
extract Business information in SOAP message and try to validate it against
the WSDL of the WS.
The problem is that, in my SOAP response, some attributes refer to the
technical namespace "*xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance*"
*, which is* declared in the technical part of the message, in
soapenv:Envelope. When the business content is extracted from the technical
message, the message isn't validate against WSDL because he just don't know
the "xsi" namespace that content refer to.

Is there a way by changing server-config.wsdd or deploy.wsdd to associate
the xsi namespace to a new declaration in body part? I don't even know if
that request make sense or if I should consider things another way?!

Here is a typical message SOAP returned by the webservice and which show the
problem:

<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>
      <synchronisationPersonneResponse xmlns="
http://app.domain.fr/service/impl <http://acd.areva.fr/service/impl>">
         <ns1:synchronisationPersonneReturn xmlns:ns1="
http://app.domain.fr/service/dto <http://acd.areva.fr/service/dto>">
            <ns1:recruteDate/>
            ...
            <ns1:postOfficeBox *xsi:nil="true"*/>
            <ns1:telephoneNumber *xsi:nil="true"*/>
            <ns1:titleLink>MISS</ns1:titleLink>
            <ns1:uid *xsi:nil="true*"/>
         </ns1:synchronisationPersonneReturn>
      </synchronisationPersonneResponse>
   </soapenv:Body>
</soapenv:Envelope>

In blue is the technical part of the SOAP message and in black the business
part.

I would need something like this, for instance:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"**>
   <soapenv:Body>
      <synchronisationPersonneResponse xmlns="
http://app.domain.fr/service/impl <http://acd.areva.fr/service/impl>" *
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"*>
         <ns1:synchronisationPersonneReturn xmlns:ns1="
http://app.domain.fr/service/dto <http://acd.areva.fr/service/dto>">
            <ns1:recruteDate/>
            ...
            <ns1:postOfficeBox *xsi:nil="true"*/>
            <ns1:telephoneNumber *xsi:nil="true"*/>
            <ns1:titleLink>MISS</ns1:titleLink>
            <ns1:uid *xsi:nil="true*"/>
         </ns1:synchronisationPersonneReturn>
      </synchronisationPersonneResponse>
   </soapenv:Body>
</soapenv:Envelope>

Lot of thanks by advance.

Greetings,

Kayser

Fwd: Trouble moving technical namespaces declaration from soapenv:envelope to business part of soap messages.

Posted by aaa aaa <ka...@gmail.com>.
Hello,

I'm working on integration of a webservice, running under Axis1 v1.4. It is
actually working quite fine, handling SOAP requests and responding valide
SOAP response.

I still do have trouble with a SOAP client based on Biztalk. This client
extract Business information in SOAP message and try to validate it against
the WSDL of the WS.
The problem is that, in my SOAP response, some attributes refer to the
technical namespace "*xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance*"
*, which is* declared in the technical part of the message, in
soapenv:Envelope. When the business content is extracted from the technical
message, the message isn't validate against WSDL because he just don't know
the "xsi" namespace that content refer to.

Is there a way by changing server-config.wsdd or deploy.wsdd to associate
the xsi namespace to a new declaration in body part? I don't even know if
that request make sense or if I should consider things another way?!

Here is a typical message SOAP returned by the webservice and which show the
problem:

<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>
      <synchronisationPersonneResponse xmlns="
http://app.domain.fr/service/impl <http://acd.areva.fr/service/impl>">
         <ns1:synchronisationPersonneReturn xmlns:ns1="
http://app.domain.fr/service/dto <http://acd.areva.fr/service/dto>">
            <ns1:recruteDate/>
            ...
            <ns1:postOfficeBox *xsi:nil="true"*/>
            <ns1:telephoneNumber *xsi:nil="true"*/>
            <ns1:titleLink>MISS</ns1:titleLink>
            <ns1:uid *xsi:nil="true*"/>
         </ns1:synchronisationPersonneReturn>
      </synchronisationPersonneResponse>
   </soapenv:Body>
</soapenv:Envelope>

In blue is the technical part of the SOAP message and in black the business
part.

I would need something like this, for instance:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"**>
   <soapenv:Body>
      <synchronisationPersonneResponse xmlns="
http://app.domain.fr/service/impl <http://acd.areva.fr/service/impl>" *
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"*>
         <ns1:synchronisationPersonneReturn xmlns:ns1="
http://app.domain.fr/service/dto <http://acd.areva.fr/service/dto>">
            <ns1:recruteDate/>
            ...
            <ns1:postOfficeBox *xsi:nil="true"*/>
            <ns1:telephoneNumber *xsi:nil="true"*/>
            <ns1:titleLink>MISS</ns1:titleLink>
            <ns1:uid *xsi:nil="true*"/>
         </ns1:synchronisationPersonneReturn>
      </synchronisationPersonneResponse>
   </soapenv:Body>
</soapenv:Envelope>

Lot of thanks by advance.

Greetings,

Kayser

WSDL packaged with service; useOriginalwsdl and ClassCastException, NullPointerException, & NumberFormatException errors

Posted by William Walsh <WW...@curamsoftware.com>.
Hi,  

We are working with Axis2 1.5.1 in WebSphere using exploded format and are finding that if we package the WSDL in the services directory that invocation of the service fails due to a series of java.lang.ClassCastException, java.lang.NullPointerException, & java.lang.NumberFormatException errors (attached is a very long stack trace from WebSphere).  This behavior changes slightly if we include <param name="useOriginalwsdl">true</parameter> in services.xml.  If we include it with the WSDL the NumberFormatException seems to disappear and if we have it (false) without the WSDL in the service\<name>\META-INF directory the service still fails. (Without the WSDL in the META-INF directory the service works fine.) 

I didn't see anything in JIRA or previous threads to match these symptoms, the closest seemed to be:
https://issues.apache.org/jira/browse/AXIS2-4541 is still outstanding, but it's for an IllegalArgumentException.
https://issues.apache.org/jira/browse/AXIS2-3276 is NullPointerException, but specific to concurrent access, which isn't part of our scenario.

There are two notable differences in the WSDL generated at build time and the WSDL from listServices (runtime):

            <xs:element name="simpleAdd">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="toAdd1" type="xs:int"/>
                        <xs:element minOccurs="0" name="toAdd2" type="xs:int"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>

versus (build-time):
...
                        <xs:element minOccurs="0" name="args0" type="xs:int"/>
                        <xs:element minOccurs="0" name="args1" type="xs:int"/>


Also, the runtime WSDL includes this operation (non-existent) that the build time does not:
            <xs:element name="setSessionContext">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="sc" nillable="true" type="xs:anyType"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>

setSessionContext appears to be part of Axis2: org.apache.axis2.context.MessageContext.setSessionContext(SessionContext)            

Does anyone have any experience/resolution with these symptoms?

Thanks,
William


The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful. If you are not the intended
addressee please contact the sender and dispose of this e-mail. Thank you.

Re: Trouble moving technical namespaces declaration from soapenv:envelope to business part of soap messages.

Posted by Andreas Veithen <an...@gmail.com>.
As part of the promotion of the Axis project to a top level project,
we have decided to create separate mailing lists for Axis 1 and Axis2.
For all Axis 1 related questions please subscribe and post to
axis1-java-user@axis.apache.org. Thanks!

Andreas


On Mon, Apr 19, 2010 at 18:10, aaa aaa <ka...@gmail.com> wrote:
> Hello,
>
> I'm working on integration of a webservice, running under Axis1 v1.4. It is
> actually working quite fine, handling SOAP requests and responding valide
> SOAP response.
>
> I still do have trouble with a SOAP client based on Biztalk. This client
> extract Business information in SOAP message and try to validate it against
> the WSDL of the WS.
> The problem is that, in my SOAP response, some attributes refer to the
> technical namespace "xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance",
> which is declared in the technical part of the message, in soapenv:Envelope.
> When the business content is extracted from the technical message, the
> message isn't validate against WSDL because he just don't know the "xsi"
> namespace that content refer to.
>
> Is there a way by changing server-config.wsdd or deploy.wsdd to associate
> the xsi namespace to a new declaration in body part? I don't even know if
> that request make sense or if I should consider things another way?!
>
> Here is a typical message SOAP returned by the webservice and which show the
> problem:
>
> <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>
>       <synchronisationPersonneResponse
> xmlns="http://app.domain.fr/service/impl">
>          <ns1:synchronisationPersonneReturn
> xmlns:ns1="http://app.domain.fr/service/dto">
>             <ns1:recruteDate/>
>             ...
>             <ns1:postOfficeBox xsi:nil="true"/>
>             <ns1:telephoneNumber xsi:nil="true"/>
>             <ns1:titleLink>MISS</ns1:titleLink>
>             <ns1:uid xsi:nil="true"/>
>          </ns1:synchronisationPersonneReturn>
>       </synchronisationPersonneResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> In blue is the technical part of the SOAP message and in black the business
> part.
>
> I would need something like this, for instance:
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>    <soapenv:Body>
>       <synchronisationPersonneResponse
> xmlns="http://app.domain.fr/service/impl"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>          <ns1:synchronisationPersonneReturn
> xmlns:ns1="http://app.domain.fr/service/dto">
>             <ns1:recruteDate/>
>             ...
>             <ns1:postOfficeBox xsi:nil="true"/>
>             <ns1:telephoneNumber xsi:nil="true"/>
>             <ns1:titleLink>MISS</ns1:titleLink>
>             <ns1:uid xsi:nil="true"/>
>          </ns1:synchronisationPersonneReturn>
>       </synchronisationPersonneResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> Lot of thanks by advance.
>
> Greetings,
>
> Kayser
>

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