[jbossws-users] [JBossWS] - SOAP request missing namespace

yperey do-not-reply at jboss.com
Wed Jan 31 08:57:55 EST 2007


Hello,

I've followed step by step the http://wiki.jboss.org/wiki/Wiki.jsp?page=WS4EEDOCClientStepByStep

to deploy a web service client on JBoss 4.0.2 using JWSDP 1.6. The problem is that in the SOAP request I send to the server there are attributes of a complex type with missing namespace:

<?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:Header>
  |   <jbws:username soapenv:actor="http://webservice.jboss.com/ws4ee/login"
  | xmlns:jbws="http://webservice.jboss.com/ws4ee">root</jbws:username>
  |   <jbws:password soapenv:actor="http://webservice.jboss.com/ws4ee/login"
  | xmlns:jbws="http://webservice.jboss.com/ws4ee">cm9vdDE=</jbws:password>
  |  </soapenv:Header>
  |  <soapenv:Body>
  |   <ns1:LHUB_PutIntoTargetSystemsProcessRequest
  |   xmlns:ns1="http://xmlns.oracle.com/LHUB_PutIntoTargetSystems">
  |    <source>1</source>
  |    <targets>0</targets>
  |   </ns1:LHUB_PutIntoTargetSystemsProcessRequest>
  |  </soapenv:Body>
  | </soapenv:Envelope>

like for source and targets event if in the wsdl it is specified attributeFormDefault="qualified" and elementFormDefault="qualidied" as you can see:


  | ...
  | <types>
  |         <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/LHUB_PutIntoTargetSystems"
  |              xmlns="http://www.w3.org/2001/XMLSchema">
  |             <element name="LHUB_PutIntoTargetSystemsProcessRequest">
  |                 <complexType>
  |                     <sequence>
  |                         <element name="source" type="string"/>
  |                         <element name="targets" type="string"/>
  |                     </sequence>
  |                 </complexType>
  |             </element>
  |             <element name="LHUB_PutIntoTargetSystemsProcessResponse">
  |                 <complexType>
  |                     <sequence>
  |                         <element name="error" type="string"/>
  |                         <element name="description" type="string"/>
  |                         <element name="details" type="string"/>
  |                     </sequence>
  |                 </complexType>
  |             </element>
  |         </schema>
  |     </types>
  | ...
  | 

here is my wscompile line:
anonymous wrote : wscompile -gen:client -f:documentliteral -f:wsi -mapping jaxrpc-mapping-client.xml -keep config-client.xml

Here is the correct SOAP envelope that I'm supposed to have:

<?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:Header>
  |   <jbws:username soapenv:actor="http://webservice.jboss.com/ws4ee/login"
  | xmlns:jbws="http://webservice.jboss.com/ws4ee">root</jbws:username>
  |   <jbws:password soapenv:actor="http://webservice.jboss.com/ws4ee/login"
  | xmlns:jbws="http://webservice.jboss.com/ws4ee">cm9vdDE=</jbws:password>
  |  </soapenv:Header>
  |  <soapenv:Body>
  |   <ns1:LHUB_PutIntoTargetSystemsProcessRequest
  |   xmlns:ns1="http://xmlns.oracle.com/LHUB_PutIntoTargetSystems">
  |    <ns1:source>1</ns1:source>
  |    <ns1:targets>0</ns1:targets>
  |   </ns1:LHUB_PutIntoTargetSystemsProcessRequest>
  |  </soapenv:Body>
  | </soapenv:Envelope>

Any idea ?

Yann.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008782#4008782

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008782



More information about the jbossws-users mailing list