How to add custom headers to the SOAP action.

Posted by Admin on 17-Oct-2009 12:16

Hi All,

Looking at this forum, it appears that a similar question is still unanswered.

When the ".esbws" imports my WSDL, Sonic Workbench shows the following error: "Value of soapAction attribute is not a valid absolute URI". I guess the error is caused by the lack of the headers attributes, which I usually add manually when a create an XML request via a different client.

Any idea how to avoid this error. Should I add the headers directly into the XML file?

Thanks.

Salvo

Sonic_Workbench1.zip

All Replies

Posted by Admin on 18-Oct-2009 05:11

I have run a WS Profile Conformance report and got an error which suggests the problem might be related to my WSDL. So, perhaps my question is unrelated to any headers.

Exception: 
org.xml.sax.SAXException: Error: cvc-datatype-valid.1.2.1: 'urn:#ApproveUserSoap' is not a valid value for 'anyURI'.
     at org.wsi.xml.XMLUtils$ErrHandler.error(Unknown Source)
     at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
     at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
     at org.wsi.xml.jaxp.DocumentBuilderImpl.parse(Unknown Source)
     at org.wsi.xml.XMLUtils.parseXML(Unknown Source)
     at org.wsi.xml.XMLUtils.parseXMLDocument(Unknown Source)
     at org.wsi.test.profile.validator.impl.wsdl.BP2703.validate(Unknown Source)
     at org.wsi.test.profile.validator.impl.BaseValidatorImpl.processAssertions(Unknown Source)
     at org.wsi.test.profile.validator.impl.wsdl.WSDLValidatorImpl.processDefinitionAssertions(Unknown Source)
     at org.wsi.test.profile.validator.impl.wsdl.WSDLValidatorImpl.validate(Unknown Source)
     at org.wsi.test.analyzer.BasicProfileAnalyzer.validateWSDL(Unknown Source)
     at org.wsi.test.analyzer.BasicProfileAnalyzer.validateConformance(Unknown Source)
     at org.wsi.test.analyzer.BasicProfileAnalyzer.main(Unknown Source)

Posted by Bill Wood on 18-Oct-2009 14:54

I think you are correct.   I believe ESBWS requires that the soapAction be a valid URI -- the "#" is the problem as this implies a reference within the parent URI.

(I believe this is related to the use of WS-Addressing and the need to have the soapAction in the WS-A headers).

Posted by Admin on 20-Oct-2009 12:39

Thanks William,

I am going to replace the Web Service with an other one. It doesn't provide me enough confidence.

Thanks a lot.

Salvo

This thread is closed