I get a wrong Soap Message using Xfire. The problem is, that some
namespaces are not declared altough I'm using the property
XmlBeansType.XMLBEANS_NAMESPACE_HACK.

I'm using Xfire in combination with XMLBeans. I generated Java Objects
using XMLBeans scomp command 'scomp -compiler
j2sdk1.4.2_10\bin\javac.exe -javasource 1.4 -out some.jar some.xsd

The code to invoke the Webservice looks as follow:

                ECardAuskunftDocument requestDokument =
ECardAuskunftDocument.Factory.newInstance();
                ECardAuskunft auskunft =
requestDokument.addNewECardAuskunft();
                ECardAuskunftReq req = auskunft.addNewReq();
                req.setBearbGrund(bearbeitungsgrund);
                Service serviceModel = new
XmlBeansServiceFactory().create(EcardWebservice.class);
        
serviceModel.setProperty(XmlBeansType.XMLBEANS_NAMESPACE_HACK, "true");
                EcardWebservice onlineServices = (EcardWebservice) new
XFireProxyFactory().create(serviceModel, ecardWebserviceUrl);
                return onlineServices.ecardAuskunft(auskunft);


Debugging into the soap Message I see the following:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <soap:Body>
                <ECardAuskunft
xmlns="http://onlineservices.server.ecard.siemens.at";>
                        <onl:req>
                                <val:bearbGrund
xmlns:val="http://valueobject.onlineservices.server.ecard.siemens.at";>Te
st</val:bearbGrund>
                        </onl:req>
                </ECardAuskunft>
        </soap:Body>
</soap:Envelope>

The SOAP fault tells me, that the 'onl' namespace is not declared, that
is true in my opinion. So what am I doing wrong?

Thanks for help
Rene



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to