[jboss-svn-commits] JBL Code SVN: r31146 - labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jan 19 14:38:40 EST 2010
Author: kevin.conner at jboss.com
Date: 2010-01-19 14:38:40 -0500 (Tue, 19 Jan 2010)
New Revision: 31146
Modified:
labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
Log:
Initialise WS-A response for one way: JBESB-3135
Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java 2010-01-19 18:09:40 UTC (rev 31145)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/internal/soa/esb/webservice/BaseWebService.java 2010-01-19 19:38:40 UTC (rev 31146)
@@ -160,7 +160,10 @@
AuthenticationRequest authRequest = extractSecurityDetails(request, esbReq);
ExtractorUtil.addAuthRequestToMessage(authRequest, esbReq);
+ // We should be able to return null here but this causes JBossWS to NPE.
final Message esbRes = deliverMessage(esbReq) ;
+
+ final SOAPMessage response = SOAP_MESSAGE_FACTORY.createMessage();
if (esbRes != null)
{
final Object input = responseProxy.getPayload(esbRes) ;
@@ -172,29 +175,23 @@
final Document respDoc = YADOMUtil.parseStream(new ByteArrayInputStream(soapRes.getBytes()),
false, false, true);
- final SOAPMessage response = SOAP_MESSAGE_FACTORY.createMessage();
response.getSOAPBody().addDocument(respDoc) ;
- if (soapIncomingProps == null)
- {
- AddressingContext.setAddressingProperties(null) ;
- }
- else
- {
- final SOAPAddressingProperties soapOutgoingProps = (SOAPAddressingProperties) ADDRESSING_BUILDER.newAddressingProperties() ;
- if (action != null)
- {
- soapOutgoingProps.setAction(ADDRESSING_BUILDER.newURI(action)) ;
- }
- AddressingContext.setAddressingProperties(soapOutgoingProps) ;
- }
- return response ;
}
- else
+ if (soapIncomingProps == null)
{
AddressingContext.setAddressingProperties(null) ;
- // We should be able to return null here but this causes JBossWS to NPE.
- return SOAP_MESSAGE_FACTORY.createMessage();
}
+ else
+ {
+ final SOAPAddressingProperties soapOutgoingProps = (SOAPAddressingProperties) ADDRESSING_BUILDER.newAddressingProperties() ;
+ if (action != null)
+ {
+ soapOutgoingProps.setAction(ADDRESSING_BUILDER.newURI(action)) ;
+ }
+ AddressingContext.setAddressingProperties(soapOutgoingProps) ;
+ }
+
+ return response ;
}
catch (final WebServiceException wse)
{
More information about the jboss-svn-commits
mailing list