i have following issue cxf version 2.7.7-redhat-1, seems bug in library. following request:
<?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <soap:body> <authorizepayment xmlns="http://ejb.example.org"> <request xmlns=""> <role xmlns:q1="http://to.homepay.example.org" xsi:type="q1:customerto"> <user>7c742</user> </role> <error> <errorcode>1</errorcode> <errormessage>1</errormessage> </error> <status> <code>1</code> </status> <ordaccount>1</ordaccount> <logid>374216011815223570893830967949</logid> <signmethod>1</signmethod> <lang>1</lang> <terminalid>1</terminalid> <terminallocation>earth</terminallocation> </request> </authorizepayment> </soap:body> </soap:envelope>
i following error:
<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:body> <soap:fault> <faultcode>soap:client</faultcode> <faultstring>unmarshalling error: unexpected element (uri:"http://ejb.example.org", local:"request"). expected elements <{}request></faultstring> </soap:fault> </soap:body> </soap:envelope>
from request can see namespace of request "" overridden parent.
if change request to:
<?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <soap:body> <aa:authorizepayment xmlns:aa="http://ejb.example.org"> <request xmlns=""> <role xmlns:q1="http://to.homepay.example.org" xsi:type="q1:customerto"> <user>7c742</user> </role> <error> <errorcode>1</errorcode> <errormessage>1</errormessage> </error> <status> <code>1</code> </status> <ordaccount>1</ordaccount> <logid>374216011815223570893830967949</logid> <signmethod>1</signmethod> <lang>1</lang> <terminalid>1</terminalid> <terminallocation>earth</terminallocation> </request> </aa:authorizepayment> </soap:body> </soap:envelope>
the call works. need way fix issue server side, client can't modified change request.
versions: jboss release: 7.3.4.final-redhat-1 "janus" jboss product: eap 6.2.4.ga java.version: 1.7.0_91
set elementformdefault=qualified
in wsdl, generate artifacts , redeploy application.
qualified
means local element declarations (xs:element within xs:complextype) refers elements in target namespace of schema. without it, refer elements in no namespace.
Comments
Post a Comment