Thank's Fang-
Actually I got it to work!!!
1. I had to put 2 wsdl's in mine SU, one for the consumer and the other for
the provider.
2. The provider wsdl was the actual Axis2 generated wsdl, the consumer one
was exactly the same
except I had to change the name of the service ( see below )
3. I had to put validateWsdl="false" so not to get the WS-I BP v1.x
validation to work, since it does not support SOAP 1.2



consumer:
<http:soap-consumer service="ns:ConsumerServiceSOAP12"
                      endpoint="WorkWebServiceHttpSoap12Endpoint"
                      targetService="ns:WorkWebService"
                      locationURI="http://0.0.0.0/ConsumerServiceSOAP12";
                      validateWsdl="false"
                      wsdl="classpath:ConsumerServiceSOAP12.wsdl"/>

consumers's wsdl

<wsdl:service name="ConsumerServiceSOAP12">
        <wsdl:port name="WorkWebServiceHttpSoap12Endpoint"
binding="ns:WorkWebServiceSoap12Binding">
            <soap12:address location="
http://localhost:8082/axis2/WorkWebService.WorkWebServiceHttpSoap12Endpoint/
"/>
        </wsdl:port>
    </wsdl:service>



provider:

  <http:soap-provider service="ns:WorkWebService"
                      endpoint="WorkWebServiceHttpSoap12Endpoint"
                      locationURI="
http://localhost:8082/axis2/WorkWebService.WorkWebServiceHttpSoap12Endpoint/
"
                      validateWsdl="false"
                      wsdl="classpath:WorkWebService.wsdl"/>


provider's wsdl
<wsdl:service name="WorkWebService">
        <wsdl:port name="WorkWebServiceHttpSoap12Endpoint"
binding="ns:WorkWebServiceSoap12Binding">
            <soap12:address location="
http://localhost:8082/axis2/WorkWebService.WorkWebServiceHttpSoap12Endpoint/
"/>
        </wsdl:port>
    </wsdl:service>


This is just one SU. Now,  I need to decople this abit. I need the consumer
to target a different SU that will accsses the NMR message, append another
String to the  the message payload and then send it to the provider for
actually accessing the web service with the new payload. The web service
operation is exposed java class that accepts String as input and returns the
same string. So If I sent message with payload "One" once in the NMR and
consumed from the SU in question
yto append to this "One" the string "Two" and then forward it to the
providers web service. In the end, from the call to the expoxed HTTP+SOAP
component,  if I send "One" I shoud receive back "OneTwo" at the remote
client.
What is the best way of achiving this, if there is such?

On Wed, Feb 4, 2009 at 9:59 PM, Freeman Fang <[email protected]> wrote:

> Asen wrote:
>
>> I am trying to connect Axis2 version 1.4.1 deployed web service and
>> ServiceMix 3.3 through consumer/provider endpoints.
>> When using the old endpoints the SA got deployed, but when tried to
>> execute
>> the pipeline the Axis2 threw up due to the internal check between the
>> request Content-Type and the namespace of the SOAP envelope as per
>> http://wso2.org/library/559
>>
>> POST /jbi/ConsumerService12/ HTTP/1.1
>> Content-Type: *application/soap+xml*; charset=UTF-8; action="urn:doWork"
>> User-Agent: Axis2
>> Host: 127.0.0.1:8081
>> Transfer-Encoding: chunked
>>
>> 204
>> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="
>> http://www.w3.org/2003/05/soap-envelope";><soapenv:Header xmlns:wsa="
>> http://www.w3.org/2005/08/addressing";><wsa:To>
>> http://asen.gallup.com:8081/js/jbi/ConsumerService12/
>> </wsa:To><wsa:MessageID>urn:uuid:447FDAA17B8E22B6381233762375181</wsa:MessageID><wsa:Action>urn:doWork</wsa:Action></soapenv:Header><soapenv:Body><ns1:doWork
>> xmlns:ns1="http://webservices.gallup.com
>> "><ns1:message>Asen</ns1:message></ns1:doWork></soapenv:Body></soapenv:Envelope>
>>
>> 0
>>
>> HTTP/1.1 500 Internal Server Error
>> Server: Apache-Coyote/1.1
>> Content-Type: *text/xml*;charset=UTF-8
>> Transfer-Encoding: chunked
>> Date: Wed, 04 Feb 2009 15:46:15 GMT
>> Connection: close
>>
>> 1af
>> <?xml version='1.0' encoding='UTF-8'?><*soapenv*:Envelope
>> *xmlns:soapenv*=*"
>> http://www.w3.org/2003/05/soap-envelope
>> "*><soapenv:Body><soapenv:Fault><soapenv:Code><soapenv:Value>soapenv:Receiver</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text
>> xml:lang="en">java.lang.IllegalArgumentException: Bad syntax: expected
>>
>> [part0][sep][part1][sep][part2]</soapenv:Text></soapenv:Reason></soapenv:Fault></soapenv:Body></soapenv:Envelope>
>>
>> 0
>>
>>
>> When using the new http end points <http:soap-consumer ... >
>> <http:soap-provider ... >, the SA failed to load due to WSDL is not WS-I
>> BP,
>> caused by a SOAP 1.2 port binding.
>>
>> Is there a way to overcome this with some setting in servicemix 3.3 with
>> the
>> current servicemix-http component, or not posible at all ?
>> Axis2 as of now will always expect the Content-Type of the request to
>> match
>> the soap envelope namaspace, which will
>> make it incompatible for use of SOAP 1.2 with ServiceMix 3.3
>>
>> java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?><jbi-task
>> xmlns="
>> http://java.sun.com/xml/ns/jbi/management-message"; version="1.0">
>> <jbi-task-result>
>> <frmwk-task-result>
>> <frmwk-task-result-details>
>> <task-result-details>
>> <task-id>deploy</task-id>
>> <task-result>FAILED</task-result>
>> <message-type>ERROR</message-type>
>> </task-result-details>
>> </frmwk-task-result-details>
>> </frmwk-task-result>
>> <component-task-result>
>> <component-name>servicemix-http</component-name>
>> <component-task-result-details>
>> <task-result-details>
>> <task-id>deploy</task-id>
>> <task-result>FAILED</task-result>
>> <message-type>ERROR</message-type>
>> <task-status-msg>
>> <msg-loc-info>
>> <loc-token/>
>> <loc-message>Unable to parse result string</loc-message>
>> </msg-loc-info>
>> </task-status-msg>
>> <exception-info>
>> <nesting-level>1</nesting-level>
>> <loc-token/>
>> <loc-message>WSDL is not WS-I BP compliant: [binding "{
>> http://webservices.gallup.com}WorkWebServiceHttpSoap12EndpointBinding"; :
>> Basic Profile Violation #R2401: A wsdl:binding element in a DESCRIPTION
>> MUST
>> use WSDL SOAP Binding as defined in WSDL 1.1 Section 3.]</loc-message>
>> <stack-trace><![CDATA[javax.jbi.management.DeploymentException: WSDL is
>> not
>> WS-I BP compliant: [binding
>> "{http://webservices.gallup.com}WorkWebServiceHttpSoap12EndpointBinding";
>> : Basic Profile Violation #R2401: A wsdl:binding element in a DESCRIPTION
>> MUST use WSDL SOAP Binding as defined in WSDL 1.1 Section 3.]
>>    at
>>
>> org.apache.servicemix.http.endpoints.HttpSoapConsumerEndpoint.validateWsdl1(HttpSoapConsumerEndpoint.java:183)
>>    at
>>
>> org.apache.servicemix.http.endpoints.HttpSoapConsumerEndpoint.validate(HttpSoapConsumerEndpoint.java:149)
>>    at
>>
>> org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeployer.java:58)
>>    at
>>
>> org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBeanDeployer.java:55)
>>    at
>>
>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:96)
>>    at
>>
>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>>    at
>>
>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>>    at
>>
>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:667)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:631)
>>    at java.util.TimerThread.mainLoop(Timer.java:512)
>>    at java.util.TimerThread.run(Timer.java:462)
>> ]]></stack-trace>
>> </exception-info>
>> </task-result-details>
>> </component-task-result-details>
>> </component-task-result>
>> </jbi-task-result>
>> </jbi-task>
>>
>>    at
>>
>> org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:125)
>>    at
>>
>> org.apache.servicemix.jbi.framework.ManagementSupport.failure(ManagementSupport.java:111)
>>    at
>>
>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:543)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:667)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>>    at
>>
>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:631)
>>    at java.util.TimerThread.mainLoop(Timer.java:512)
>>    at java.util.TimerThread.run(Timer.java:462)
>>
>>
>>
> I go through the code, the exception you saw here means your wsdl used in
> your http soap consumer endpoint is invalid, it use wsdl1.1  namespace but
> use wsdl2  element, could you post your wsdl also if possible?
> Freeman
>

Reply via email to