On 1/16/07, beyond30lyc <[EMAIL PROTECTED]> wrote:

Thank you very much for your reply. The two are packeged in separate SUs and
i can not deploy them to the same assembly but separately is OK.
And another problem occurs. My external service is from .NET plateform and
its WSDL file is
<?xml version="1.0" encoding="utf-8" ?>
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
  xmlns:s="http://www.w3.org/2001/XMLSchema"; xmlns:s0="http://tempuri.org/";
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
  xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
  targetNamespace="http://tempuri.org/";
  xmlns="http://schemas.xmlsoap.org/wsdl/";>
<types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/";>
<s:element name="HelloWorld">
  <s:complexType />
  </s:element>
<s:element name="HelloWorldResponse">
<s:complexType>
<s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult"
type="s:string" />
  </s:sequence>
  </s:complexType>
  </s:element>
  <s:element name="Adder">
<s:complexType>
<s:sequence>
  <s:element minOccurs="1" maxOccurs="1" name="a" type="s:int" />
  <s:element minOccurs="1" maxOccurs="1" name="b" type="s:int" />
  </s:sequence>
  </s:complexType>
  </s:element>
<s:element name="AdderResponse">
 <s:complexType>
<s:sequence>
  <s:element minOccurs="1" maxOccurs="1" name="AdderResult" type="s:int" />
  </s:sequence>
  </s:complexType>
  </s:element>
  <s:element name="string" nillable="true" type="s:string" />
  <s:element name="int" type="s:int" />
  </s:schema>
  </types>
<message name="HelloWorldSoapIn">
  <part name="parameters" element="s0:HelloWorld" />
  </message>
<message name="HelloWorldSoapOut">
  <part name="parameters" element="s0:HelloWorldResponse" />
  </message>
  <message name="AdderSoapIn">
  <part name="parameters" element="s0:Adder" />
  </message>
<message name="AdderSoapOut">
  <part name="parameters" element="s0:AdderResponse" />
  </message>
  <message name="HelloWorldHttpGetIn" />
 <message name="HelloWorldHttpGetOut">
  <part name="Body" element="s0:string" />
  </message>
 <message name="AdderHttpGetIn">
  <part name="a" type="s:string" />
  <part name="b" type="s:string" />
  </message>
 <message name="AdderHttpGetOut">
  <part name="Body" element="s0:int" />
  </message>
  <message name="HelloWorldHttpPostIn" />
<message name="HelloWorldHttpPostOut">
  <part name="Body" element="s0:string" />
  </message>
 <message name="AdderHttpPostIn">
  <part name="a" type="s:string" />
  <part name="b" type="s:string" />
  </message>
 <message name="AdderHttpPostOut">
  <part name="Body" element="s0:int" />
  </message>
 <portType name="Service1Soap">
 <operation name="HelloWorld">
  <input message="s0:HelloWorldSoapIn" />
  <output message="s0:HelloWorldSoapOut" />
  </operation>
 <operation name="Adder">
  <input message="s0:AdderSoapIn" />
  <output message="s0:AdderSoapOut" />
  </operation>
  </portType>
 <portType name="Service1HttpGet">
 <operation name="HelloWorld">
  <input message="s0:HelloWorldHttpGetIn" />
  <output message="s0:HelloWorldHttpGetOut" />
  </operation>
<operation name="Adder">
  <input message="s0:AdderHttpGetIn" />
  <output message="s0:AdderHttpGetOut" />
  </operation>
  </portType>
 <portType name="Service1HttpPost">
 <operation name="HelloWorld">
  <input message="s0:HelloWorldHttpPostIn" />
  <output message="s0:HelloWorldHttpPostOut" />
  </operation>
 <operation name="Adder">
  <input message="s0:AdderHttpPostIn" />
  <output message="s0:AdderHttpPostOut" />
  </operation>
  </portType>
 <binding name="Service1Soap" type="s0:Service1Soap">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document" />
 <operation name="HelloWorld">
  <soap:operation soapAction="http://tempuri.org/HelloWorld";
style="document" />
 <input>
  <soap:body use="literal" />
  </input>
<output>
  <soap:body use="literal" />
  </output>
  </operation>
 <operation name="Adder">
  <soap:operation soapAction="http://tempuri.org/Adder"; style="document" />
 <input>
  <soap:body use="literal" />
  </input>
 <output>
  <soap:body use="literal" />
  </output>
  </operation>
  </binding>
 <binding name="Service1HttpGet" type="s0:Service1HttpGet">
  <http:binding verb="GET" />
 <operation name="HelloWorld">
  <http:operation location="/HelloWorld" />
 <input>
  <http:urlEncoded />
  </input>
 <output>
  <mime:mimeXml part="Body" />
  </output>
  </operation>
 <operation name="Adder">
  <http:operation location="/Adder" />
 <input>
  <http:urlEncoded />
  </input>
 <output>
  <mime:mimeXml part="Body" />
  </output>
  </operation>
  </binding>
 <binding name="Service1HttpPost" type="s0:Service1HttpPost">
  <http:binding verb="POST" />
 <operation name="HelloWorld">
  <http:operation location="/HelloWorld" />
 <input>
  <mime:content type="application/x-www-form-urlencoded" />
  </input>
   <output>
  <mime:mimeXml part="Body" />
  </output>
  </operation>
 <operation name="Adder">
  <http:operation location="/Adder" />
 <input>
  <mime:content type="application/x-www-form-urlencoded" />
  </input>
 <output>
  <mime:mimeXml part="Body" />
  </output>
  </operation>
  </binding>
 <service name="Service1">
 <port name="Service1Soap" binding="s0:Service1Soap">
  <soap:address location="http://202.118.22.189/Adder/Service1.asmx"; />
  </port>
 <port name="Service1HttpGet" binding="s0:Service1HttpGet">
  <http:address location="http://202.118.22.189/Adder/Service1.asmx"; />
  </port>
 <port name="Service1HttpPost" binding="s0:Service1HttpPost">
  <http:address location="http://202.118.22.189/Adder/Service1.asmx"; />
  </port>
  </service>
  </definitions>

The xbean.xml of my provider is
<beans xmlns:http="http://servicemix.apache.org/http/1.0";
       xmlns:external="http://tempuri.org";>

  <http:endpoint service="external:Service1"
                 endpoint="Service1Soap"
                 role="provider"
                 locationURI="http://202.118.22.189/Adder/Service1.asmx";
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out";

wsdlResource="http://202.118.22.189/Adder/Service1.asmx?wsdl";
                  soap="true" />
 </beans>
the service ,endpoint ,locationURI,wsdlResource are from the wsdl
The xbean.xml of my consumer is

 <http:endpoint service="consumer"
                 endpoint="soap"
                 targetService="external:Service1"
                 role="consumer"
                 locationURI="http://localhost:8192/example/";
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
                 soap="true" />

the targetService is from the service element of the provider xbean.xml

Then i use the client proxy html page to test it, i add
http://localhost:8192/example/ to the end points. but an exception occurs
which tells me that internal 500 error occurs

The HTTP status code 500 is a generic error that doesn't point to
anything in particular. When I'm troubleshooting web services, the
first thing I inspect are namespaces to make sure they match -
including ending slashes (/). Beyond that, using TCPMon
(http://ws.apache.org/commons/tcpmon/) or something similar can be
very useful as it allows you to inspect and even edit HTTP requests
and repsonses.

Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/

Reply via email to