You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by baryzhongzsd <ba...@gmail.com> on 2008/06/29 14:13:12 UTC

A problem about using of servicemix-http

http://www.nabble.com/file/p18180009/SendEmailPort.wsdl SendEmailPort.wsdl 

    Hi, everybody. I want to use servicemix-http component to deploy a
external web service. But met some strange problem.

The web service is a mail delivery service which has a wsdl(in attachment)

I use SA & SU method to configure the sm-http component, the 2 xBean.xml
which i wrote are as below.
the consumer is:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:barry="http://servicemix.apache.org/barry">

  <http:endpoint service="barry:httpBinding"
                 endpoint="httpReceiver"
                 soap="true"
                 soapVersion="1.1"
                 role="consumer" 
                 locationURI="http://localhost:8901"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
    
targetService="http://www.bupt.edu.cn/skl/wsdl/cngi/mail/v1_0/service:SendEmailService"
                 targetEndpoint="SendEmailPort"/>     
</beans>

the provider is:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:barry="http://servicemix.apache.org/barry">       
     <http:endpoint
service="http://www.bupt.edu.cn/skl/wsdl/cngi/mail/v1_0/service:SendEmailService"
                    endpoint="SendEmailPort"
                    role="provider" 
                    soap="true"
                    soapAction=""
                    defaultMep="http://www.w3.org/2004/08/wsdl/in-out" 
                   
locationURI="http://59.64.157.127:7011/axis/services/SendEmailPort"/> 
</beans>

In client , i wrote down the soap message as below:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
 <ns1:UserName soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" 
               soapenv:mustUnderstand="0" 
               xsi:type="soapenc:string" 
              
xmlns:ns1="http://www.bupt.edu.cn/skl/wsdl/cngi/mail/v1_0/service" 
               xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
     1
 </ns1:UserName>
 <ns2:PassWord soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" 
               soapenv:mustUnderstand="0" 
               xsi:type="soapenc:string" 
              
xmlns:ns2="http://www.bupt.edu.cn/skl/wsdl/cngi/mail/v1_0/service" 
               xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    25Pxmw/+/qKg2arQpLdvqQ==
 </ns2:PassWord>
</soapenv:Header>
<soapenv:Body>
 <sendEmail
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <arg0 soapenc:arrayType="xsd:anyType[1]" 
         xsi:type="soapenc:Array" 
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <arg0 href="#id0"/>
   </arg0>
   <arg1 href="#id1"/>
   <arg2 xsi:type="soapenc:string" 
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
       59.64.156.145
   </arg2>
   <arg3 xsi:type="soapenc:string"
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        cngitest
   </arg3>
   <arg4 xsi:type="soapenc:string" 
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        cngitest
   </arg4>
   <arg5 xsi:type="soapenc:string"
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
     fffff
   </arg5>
   <arg6 xsi:type="soapenc:string"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
     sssss
   </arg6>
   <arg7 href="#id2"/>
   <arg8 href="#id3"/>
</sendEmail>
<multiRef id="id0" soapenc:root="0" 
          soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
          xsi:type="ns5:EndUserIdentifier" 
          xmlns:ns5="http://www.bupt.edu.cn/skl/schema/cngi/common/v1_0" 
          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<value xsi:type="xsd:anyURI">mailto:cngitest@telestar.bj.cn</value>
</multiRef>
<multiRef id="id1" soapenc:root="0" 
          soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
          xsi:type="ns6:EndUserIdentifier"
          xmlns:ns6="http://www.bupt.edu.cn/skl/schema/cngi/common/v1_0" 
          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<value xsi:type="xsd:anyURI">mailto:cngitest@telestar.bj.cn</value>
</multiRef>
<multiRef id="id2" soapenc:root="0" 
          soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
          xsi:type="ns3:MessagePriority" 
          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
          xmlns:ns3="http://www.bupt.edu.cn/skl/schema/cngi/mail/v1_0">
    Default
</multiRef>
<multiRef id="id3" soapenc:root="0" 
          soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
          xsi:type="ns4:SmtpVerifyRequest" 
          xmlns:ns4="http://www.bupt.edu.cn/skl/schema/cngi/mail/v1_0" 
          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
     True
</multiRef>
</soapenv:Body>
</soapenv:Envelope>

notice that there is a <multiRef>tag in soap message, right?It contains some
complex data type. But when this message transfer to sm-http component, all
this part has been filtered. Thereby it couldn't invoke the service.

I have tried to adjust the xbean.xml, such as delete the soap property in
both consumer and provider. howerver, the http header will lack the "soap
action“ property which is necessary for soap engine to parse.

Can any body tell me how to fix that problem?  Thanks in advance!~

-- 
View this message in context: http://www.nabble.com/A-problem-about-using-of-servicemix-http-tp18180009p18180009.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A problem about using of servicemix-http

Posted by baryzhongzsd <ba...@gmail.com>.
my problem was solved, servicemix-http only support the literal/document way
of binding type. 


angeloNZ wrote:
> 
> hi, did you ever get to resolving this problem?  I have the same problem
> but in my case the response I'm getting is also filtered due to complex
> types.
> 
> 
> baryzhongzsd wrote:
>> 
>> It's still me, the key point of above question is that whether
>> sermicemix-http component support complex type? 
>> 
>> if not , what shall i do? Hope some one can help me~
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/A-problem-about-using-of-servicemix-http-tp18180009p22008682.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A problem about using of servicemix-http

Posted by angeloNZ <an...@nz.fujitsu.com>.
hi, did you ever get to resolving this problem?  I have the same problem but
in my case the response I'm getting is also filtered due to complex types.


baryzhongzsd wrote:
> 
> It's still me, the key point of above question is that whether
> sermicemix-http component support complex type? 
> 
> if not , what shall i do? Hope some one can help me~
> 

-- 
View this message in context: http://www.nabble.com/A-problem-about-using-of-servicemix-http-tp18180009p21989785.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A problem about using of servicemix-http

Posted by baryzhongzsd <ba...@gmail.com>.
It's still me, the key point of above question is that whether
sermicemix-http component support complex type? 

if not , what shall i do? Hope some one can help me~
-- 
View this message in context: http://www.nabble.com/A-problem-about-using-of-servicemix-http-tp18180009p18212036.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.