Anne,

It worked after fixing the error i.e.
tns:PutConfigRequest -> tns:PutSCIRequest


thank you,
Vikas

+++++++++++++++++++++++++++++++++++++


Now, according to your WSDL, the child element of the SOAP Body should be
called c

Anne


On 3/13/06, Vikas Singh <[EMAIL PROTECTED]> wrote:
Anne, Thanks for your help.

I tried changes suggested by you but it did not work.

WSDL file:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"

xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd=" http://www.w3.org/2001/XMLSchema" name="NewWSDLFile"
<wsdl:types>
<xsd:schema
targetNamespace=" http://myns/schemas/2006/02/26/sciwsdl"

xmlns:scx=" http://myns/schemas/2006/3/3/sci"
elementFormDefault="qualified">
<xsd:import
namespace=" http://myns/schemas/2006/3/3/sci"
schemaLocation=" http://localhost:8080/jce/sci.xsd" />
<xsd:element name="PutSCIRequest">

<xsd:complexType>
<xsd:sequence>
<xsd:element ref="scx:SCIConfigRoot" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PutSCIResponse">

<xsd:complexType />
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="PutSCIResponse">
<wsdl:part element="tns:PutSCIResponse" name="PutSCIResponse" />
</wsdl:message>
<wsdl:message name="PutSCIRequest">
<wsdl:part element="tns:PutSCIRequest" name="PutSCIRequest" />

</wsdl:message>
<wsdl:portType name="SCIConfig">
<wsdl:operation name="putSCI">
<wsdl:input message="tns:PutSCIRequest" />
<wsdl:output message="tns:PutSCIResponse" />

</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="sciconfigSoapBinding" type="tns:SCIConfig">
<wsdlsoap:binding style="document"
transport=" http://schemas.xmlsoap.org/soap/http " />
<wsdl:operation name="putSCI">
<wsdlsoap:operation
soapAction=" http://myns/schemas/2006/02/26/sciwsdl/putSCI " />
<wsdl:input>
<wsdlsoap:body parts="PutSCIRequest" use="literal" />
</wsdl:input>
<wsdl:output>
<wsdlsoap:body parts="PutSCIResponse" use="literal" />

</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SCIConfigService">

<wsdl:port binding="tns:sciconfigSoapBinding"
name="config">
<wsdlsoap:address
location="http://localhost:8080/jce/services/config" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>


Pre-serialization request body :
<mywsdl:PutConfigRequest xmlns:mywsdl=" http://myns/schemas/2006/02/26/sciwsdl ">
<scx:SCIConfigRoot xmlns:scx="http://myns/schemas/2006/3/3/sci/"
xmlns:thttp=" http://myns/schemas/2006/3/3/transport/http/"
schemaLocation="http://localhost:8080/jce/sci.xsd "

serviceGroup="travelDepartment">
<scx:Policies>
<thttp:TransportPolicy name="default.soap.http.policy" >
<thttp:AllowHttp10 >false</thttp:AllowHttp10>
<thttp:KeepAliveConnections >true</thttp:KeepAliveConnections>
</thttp:TransportPolicy>
</scx:Policies>
</scx:SCIConfigRoot>
</mywsdl:PutConfigRequest>

Post-serialization request body (in <soapenv:Body>) :
<mywsdl:PutConfigRequest xmlns:mywsdl=" http://myns/schemas/2006/02/26/sciwsdl ">
<scx:SCIConfigRoot schemaLocation="http://localhost:8080/jce/sci.xsd" serviceGroup="travelDepartment" xmlns:scx="http://myns/schemas/2006/3/3/sci/" xmlns:thttp="http://myns/schemas/2006/3/3/transport/http/">
<scx:Policies xmlns:scx="">

<thttp:TransportPolicy name="default.soap.http.policy" xmlns:thttp="">
<thttp:AllowHttp10 xmlns:thttp="" >false</thttp:AllowHttp10>
<thttp:KeepAliveConnections xmlns:thttp="">true</thttp:KeepAliveConnections>
</thttp:TransportPolicy>
</scx:Policies>
</scx:SCIConfigRoot>
</mywsdl:PutConfigRequest>

I get the following exception:
org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="scx",rawname="xmlns:scx"" is invalid. Prefixed namespace bindings may not be empty.


When I change the pre-serialization request body to contain explicit namespace defintions for all the elements :

<mywsdl:PutConfigRequest xmlns:mywsdl=" http://myns/schemas/2006/02/26/sciwsdl">
<scx:SCIConfigRoot xmlns:scx="http://myns/schemas/2006/3/3/sci/ "
xmlns:thttp=" http://myns/schemas/2006/3/3/transport/http/"
schemaLocation="http://localhost:8080/jce/sci.xsd "
serviceGroup="travelDepartment">

<scx:Policies xmlns:scx="http://myns/schemas/2006/3/3/sci/">

<thttp:TransportPolicy name="default.soap.http.policy"
xmlns:thttp="
http://myns/schemas/2006/3/3/transport/http/" >
<thttp:AllowHttp10
xmlns:thttp=" http://myns/schemas/2006/3/3/transport/http/" >false</thttp:AllowHttp10>
<thttp:KeepAliveConnections
xmlns:thttp=" http://myns/schemas/2006/3/3/transport/http/ " >true</thttp:KeepAliveConnections>
</thttp:TransportPolicy>
</scx:Policies>
</scx:SCIConfigRoot>
</mywsdl:PutConfigRequest>


Axis, post serialization does not insert any empty namespace defintions but the handler method is not found.
Couldn't find an appropriate operation for XML QName { http://myns/schemas/2006/02/26/sciwsdl}PutConfigRequest

when I tried changing
<mywsdl:PutConfigRequest xmlns:mywsdl="http://myns/schemas/2006/02/26/sciwsdl ">
to
<mywsdl:putConfig xmlns:mywsdl=" http://myns/schemas/2006/02/26/sciwsdl">
it worked.

But the issue is I have to hack all the elements with the namespace definition.


Thanks,
Vikas


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=

Vikas,

When using the message style interface, your application is responsible for
constructing the SOAP Body exactly as you've defined it in your WSDL.
According to your WSDL, the Body should contain an element called
http://myns/schemas/2006/3/3/sci/sciwsdl}PutConfigRequest (not putConfig).
Note that your WSDL has a critical namespace error: you don't declare the
"tns" namespace (the WSDL target namespace).

Anne


On 3/11/06, Vikas Singh <[EMAIL PROTECTED] > wrote:
>
> Hi,
>
> Following is the WSDL:
>
>
> <?xml version=" 1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdlsoap=" http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NewWSDLFile"
> targetNamespace=" http://myns/schemas/2006/3/3/sci//sciwsdl"
> xmlns:xsd1=" http://myns/schemas/2006/3/3/sci/sci
> ">
> <wsdl:types>
> <xsd:schema
> targetNamespace=" http://myns/schemas/2006/3/3/sci/sciwsdl"
>
> xmlns:scx=" http://myns/schemas/2006/3/3/sci/ "
> elementFormDefault="qualified">
> <xsd:import
> namespace=" http://myns/schemas/2006/3/3/sci/sci<

> schemaLocation=" http://localhost:8080/schemas/sci.xsd " />
> <xsd:element name="PutConfigRequest">
> <xsd:complexType>
>
> <xsd:sequence>
> <xsd:element ref="scx:SCIConfigRoot" />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="PutConfigResponse">
>
> <xsd:complexType />
> </xsd:element>
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="PutConfigResponse">
> <wsdl:part element="tns:PutConfigResponse" name="PutConfigResponse" />
>
> </wsdl:message>
> <wsdl:message name="PutConfigRequest">
> <wsdl:part element="tns:PutCongfigRequest" name="PutConfigRequest" />
> </wsdl:message>
> <wsdl:portType name="SCIConfig">
>
> <wsdl:operation name="putConfig">
> <wsdl:input message="tns:PutConfigRequest" />
> <wsdl:output message="tns:PutConfigResponse" />
> </wsdl:operation>
>
> </wsdl:portType>
> <wsdl:binding name="sciconfigSoapBinding" type="tns:SCIConfig">
> <wsdlsoap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http " />
> <wsdl:operation name="putConfig">
> <wsdlsoap:operation
> soapAction=" http://myns/schemas/2006/3/3/sci/putSCI" />
> <wsdl:input>
> <wsdlsoap:body parts="PutConfigRequest" use="literal" />
> </wsdl:input>
> <wsdl:output>
> <wsdlsoap:body parts="PutConfigResponse" use="literal" />
> </wsdl:output>
> </wsdl:operation>
>
> </wsdl:binding>
>
> <wsdl:service name="config">
>
> <wsdl:port binding="tns:sciconfigSoapBinding"
> name="config">
>
>
> <wsdlsoap:address
> location=" http://localhost:8080/jce/services/config" />
>
> </wsdl:port>
>
> </wsdl:service>
>
>
> </wsdl:definitions>
>
>
> I wrap my request xml (which goes into the envelop body into a putConfig
> to help it identify the 'Message' type method on the server.
> public SOAPBodyElement[] putConfig(SOAPBodyElement[] bodies)
>
>
> The xml which I set in the SOAPBodyElement [0] is
> <putConfig>
>
> <scx:ConfigRoot
> xmlns:scx=" http://myns/schemas/2006/3/3/sci/"
> xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance "
> serviceGroup="travelDepartment" >
> <scx:Policies>
> <thttp:TransportPolicy name="
> default.soap.http.policy"
> xmlns:thttp=" http://myns/schemas/2006/3/3/transport">
> <thttp:AllowHttp10 >false</thttp:AllowHttp10>
>
> </thttp:TransportPolicy>
> </scx:Policies>
> </scx:ConfigRoot>
> </putConfig>
>
>
> On the client side log I see org.apache.axis.ConfigurationException: No
> service named config is available. Though I could see it using the admin
> page of axis.
>
> (
> There is an entry
> <service name="config" provider="java:MSG" style="document" use="literal">
> in server-config.wsdd
> )
>
> Another thing which I obseve is
>
>
> java] - org.apache.axis.i18n.resource::handleGetObject (register00)
> [java] - register 'soapenv' - ' http://schemas.xmlsoap.org/soap/envelope/'
> [java] - NSPush (32)
>
> [java] - NSPush (32)
> [java] - org.apache.axis.i18n.resource::handleGetObject(register00)
> [java] - register 'soapenv' - '
> http://schemas.xmlsoap.org/soap/envelope/
> '
> [java] - org.apache.axis.i18n.resource::handleGetObject (register00)
> [java] - register 'xsd' - ' http://www.w3.org/2001/XMLSchema'
> [java] - NSPush (32)
>
> [java] - org.apache.axis.i18n.resource::handleGetObject (register00)
> [java] - register 'xsi' - ' http://www.w3.org/2001/XMLSchema-instance'
> [java] - NSPush (32)
>
> [java] - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> [java] - Start element [ http://schemas.xmlsoap.org/soap/envelope/]:Envelope
>
> [java] - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> [java] - Start element [ \
> http://schemas.xmlsoap.org/soap/envelope/
]:Body<http://schemas.xmlsoap.org/soap/enve \
> lope/%5D:Body> [java] - NSPush (32)

> [java] - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> [java] - Start element []:putConfig
> [java] - NSPush (32)
> [java] - org.apache.axis.i18n.resource::handleGetObject
> (startElem00)
> [java] - Start element []:scx:SCIConfigRoot
> [java] - org.apache.axis.i18n.resource::handleGetObject(register00)
> [java] - register 'scx' - ''
>
> [java] - NSPush (32)
> [java] - NSPush (32)
>
>
> I think the namespace could be defined at any element in the xml document.
> This does not seems to be the case.
> Please correct me If I am wrong.
>
>
>
> If I explicitely put the namespace definition in all of the quaulified
> elements, the method works fine.
> for example:
> <putConfig>
>
> <scx:ConfigRoot
> xmlns:scx="
> http://myns/schemas/2006/3/3/sci/"
> xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "
> serviceGroup="travelDepartment" >
>
> <scx:Policies>
> <thttp:TransportPolicy name=" default.soap.http.policy"
> xmlns:thttp=" http://myns/schemas/2006/3/3/transport
> ">
> <thttp:AllowHttp10 xmlns:thttp=" \
> http://myns/schemas/2006/3/3/transport">false</thttp:AllowHttp10>
>
> </thttp:TransportPolicy>
> </scx:Policies>
> </scx:ConfigRoot>
> </putConfig>
>
> Thank you,
> Vikas
>
> ------=_Part_12784_26255881.1141997947598
> Content-Type: text/plain; charset=ISO-8859-1
>
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
>
>
> WSDL please?
>
> On 3/9/06, Vikas Singh < [EMAIL PROTECTED]> wrote:
> >
> >
> > Hi,
>
> >
> > I am using Axis
> 1.3 . My xsds have elementFormDefault=3D"qualified". I a=
> m
>
> > trying to send the following xml as a soap request (doc/lit wrapped) .:
> > <?xml version=3D"1.0
> " encoding=3D"UTF-8"?>
> > <scx:ConfigRoot
> > xmlns:scx=3D" http://myns/schemas/2006/3/3/sci/"
> > xmlns:xsi=3D"
>
> http://www.w3.org/2001/XMLSchema-instance"
> > serviceGroup=3D"travelDepartment" >
> > <scx:Policies>
> > <thttp:TransportPolicy name=3D"default.soap.http.policy
> "
> > xmlns:thttp=3D"
> http://myns/schemas/2006/3/3/transport" >
> > <thttp:AllowHttp10 >false</thttp:AllowHttp10>
> > </thttp:TransportPolicy>
>
> > </scx:Policies>
> > </scx:ConfigRoot>
> >
> > The request body generated by by Axis is as following:
> > <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> > <soapenv:Envelope xmlns:soapenv=3D"
>
> > http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=3D"
>
> > http://www.w3.org/2001/XMLSchema
> " xmlns:xsi=3D"
>
>
> > http://www.w3.org/2001/XMLSchema-instance" >
> > <soapenv:Body>
> > <putConfig>
> > <scx:ConfigRoot serviceGroup=3D"travelDepartment" xmlns:scx=
>
> =3D"
> > http://myns/schemas/2006/3/3/sci/" xmlns:xsi=3D"
>
> > http://www.w3.org/2001/XMLSchema-instance
> ">
> > <scx:Policies xmlns:scx=3D"">
> > <thttp:TransportPolicy name=3D" default.soap.http.policy=
> "
> > xmlns:thttp=3D"
>
> http://myns/schemas/2006/3/3/transport" >
> > <thttp:AllowHttp10 xmlns:thttp=3D"">false</thttp:All=
>
> owHttp10>
> >
> > </thttp:TransportPolicy>
>
> > </scx:Policies>
> > </scx:ConfigRoot>
> > </putConfig>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > As per
> http://issues.apache.org/jira/browse/AXIS-1807 , it is already
> > resolved (during v 1.2) .
> > Please let me know if anyone could resolve this issue.
>
> >
> > Thank you,
> > Vikas
> >
>
>
>



Reply via email to