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 Anne Thomas Manes <at...@gmail.com> on 2006/04/17 20:32:46 UTC

Re: changing xmlns:soapenc from "http://schemas.xmlsoap.org/soap/encoding/" to "http://www.w3.org/2001/XMLSchema" fixes my problem?

Axis generates rpc/encoded style services by default. The SOAP spec ifsnot
entirely clear on this point, but it certainly leads to the conclusion that
when using SOAP encoding, messages should use SOAP encoding types rather
than the primitive XML Schema types -- e.g., the message parts are defined
like so:

<wsdl:message name="methodRequest">
  <wsdl:part name="in0" type="soapenc:string"/>
  <wsdl:part name="in1" type="soapenc:int"/>
</wsdl:message>

where xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/".

Unfortunately, a number of SOAP implementations don't follow this reasoning,
and instead they require use of the XML Schema types, like so:

<wsdl:message name="methodRequest">
  <wsdl:part name="in0" type="xsd:string"/>
  <wsdl:part name="in1" type="xsd:int"/>
</wsdl:message>

You can configure Axis to use XML Schema primitive types by including

<parameter name="dotNetSoapEncFix" value="true"/>

in your WSDD.

Alternatively (and for better interoperability results in general), switch
to "wrapped" document/literal style.

Anne

On 4/17/06, Joshua.White@hartfordlife.com <Jo...@hartfordlife.com>
wrote:
>
>
> All,
>
> I am using weblogic 9's test client generator to generate a simple UI for
> business analysts to test the functionality of my web service.  Trouble is,
> the WSDL file that AXIS generates causes this application to blow up with
> the following exception:
>
> *WsdlParseFailedException: Could not find schema for namespace
> http://schemas.xmlsoap.org/soap/encoding/*
>
> I am a little confused by this.  When I change the *xmlns:soapenc* value
> in the line below to "http://www.w3.org/2001/XMLSchema"  (see below), it
> works like a champ.  I don't profess to know everything about xml.  Can
> someone please explain this to me?
>
> Regards,
>
> Joshua
>
>
> <wsdl:definitions targetNamespace="
> http://hcnu447fnmz:7001/webservice2/services/ConsumerService"
> xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="
> http://hcnu447fnmz:7001/webservice2/services/ConsumerService" xmlns:intf="
> http://hcnu447fnmz:7001/webservice2/services/ConsumerService" *
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"* xmlns:tns1="
> http://dto.webservice.consumer.hartfordlife.com" xmlns:wsdl="
> http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="
> http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema">
>
> *************************************************************************
> This communication, including attachments, is
> for the exclusive use of addressee and may contain proprietary,
> confidential and/or privileged information. If you are not the intended
> recipient, any use, copying, disclosure, dissemination or distribution is
> strictly prohibited. If you are not the intended recipient, please notify
> the sender immediately by return e-mail, delete this communication and
> destroy all copies.
> *************************************************************************
>