servicemix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joao Simas" <jsi...@sinfic.pt>
Subject RE: Re: Problems using service mix as proxy to a webservice.
Date Thu, 13 Jul 2006 13:11:50 GMT
Hello again,

I already resolved the problem of connecting to the service mix (my fault!!!! I forgot to
put the new Service Unit in the service mix deploy).

Now I can connect to the service mix, but I'm getting an invalid soap message exception from
Axis. When I invoke the webservice I receive:
<soapenv:Body>
  <soapenv:Fault>
    <faultcode>soapenv:Server.userException</faultcode>
    <faultstring>org.xml.sax.SAXException: Bad envelope tag: methodName</faultstring>
<detail><ns1:hostnamexmlns:ns1="http://xml.apache.org/axis/">localhost</ns1:hostname></detail>
  </soapenv:Fault>
</soapenv:Body> 

So, short story, I create a SOAP Envelope, send it to Service Mix and expected the same Envelope
to be delivered to my webservice. However this didn't happened... can anyone have any idea
about the problem?

Thanks for your help.


João Simas

-----Original Message-----
From: Joao Simas [mailto:jsimas@sinfic.pt] 
Sent: quinta-feira, 13 de Julho de 2006 12:06
To: servicemix-users@geronimo.apache.org
Subject: RE: Re: Problems using service mix as proxy to a webservice.

Hi.

Thanks for your help but I still can't connect to the remote webservice. I can start servicemix,
however location set in the consumer endpoint is not accessible. 

After starting service mix I try to execute a netstat but the port I defined in the localtionURI
is not listening. The strange part is that in the no error is showed in the console or logs.

This is the xbean I'm using:

<beans xmlns:http="http://servicemix.apache.org/http/1.0" xmlns:example="urn:servicemix:soap-binding">

   <http:endpoint service="example:WebServiceB"
                  endpoint="WebServiceB"
                  targetService="example:WebServiceB" 
                  role="provider"
			locationURI="http://localhost:3001/WebB/WebServiceB"
		wsdlResource="http://localhost:3001/WebB/WebServiceB?wsdl"/>
  
  <http:endpoint service="example:WebServiceB"
               endpoint="WebServiceB"
               targetService="example:WebServiceB" 
               role="consumer" 
               soap="true" 
               locationURI="http://localhost:4044/teste"
               defaultMep="http://www.w3.org/2004/08/in-out" />

Then i try to invoque the webservice using http://localhost:4044/teste and the connection
refused error occurs :(


João Simas

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Alessio D'Innocenti
Sent: quinta-feira, 13 de Julho de 2006 11:14
To: servicemix-users@geronimo.apache.org
Subject: Re: Problems using service mix as proxy to a webservice.

Hello,
  you must define an endpoint with role=provider to refer the webservice
 to proxy and an endpoint with role=consumer to refer the proxy url.

<http:endpoint service="foo:myConsumerService" endpoint="myConsumer"
targetService="foo:WSToProxy" role="consumer" soap="true"
locationURI="http://localhost:8888/soap/Proxy"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />

<http:endpoint service="foo:WSToProxy" endpoint="myProvider"
targetService="foo:WSToProxy" role="provider"
locationURI="http://pc-work:8080/axis/services/WSToProxy"
wsdlResource="http://pc-work:8080/axis/services/WSToProxy?wsdl" />

It is important to mantein the same namespace of the service. You must
check that the "foo" namespace in the configuration file is the same of
the namespace of the webservice.

This configuration should be run, but I take a NullPointerException
because of  a null prefix in the
org.apache.servicemix.jbi.jaxp.FragmentStreamReader class....
....maybe the error is of mine....
Try and inform me of the result....


Joao Simas ha scritto:
> Hello.
> 
>  
> 
> I have a web application A that is using a webservice in another web application B. I'm
starting to integrate service mix (as a standalone application) into my structure and I'm
trying to use service mix as a proxy to the existing webservice in the web application B.
> 
>  
> 
> This is my servicemix.xml that I'm using:
> 
>  
> 
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0">
> 
>   <import resource="classpath:servicemix.xml" />
> 
> </beans>
> 
>  
> 
> And this is my xbean.xml:
> 
> <beans xmlns:http=http://servicemix.apache.org/http/1.0" xmlns:test="urn:servicemix:test-soap-binding">
> 
>             <http:endpoint service="test:WebserviceBTest"
> 
>                endpoint="WebserviceBTest"
> 
>                role="provider" 
> 
>                locationURI="http://localhost:4044/test"
> 
>                wsdlResource="http://localhost:3001/WebApplicationB/services/service1?wsdl"
/>
> 
> </beans>
> 
>  
> 
> After starting servicemix, I can't connect to the locationURI (http://localhost:4044/test)
and I'm having this exception:
> 
>  
> 
> AxisFault
> 
>  faultCode: {http://xml.apache.org/axis/}Server.userException
> 
>  faultString: java.net.ConnectException: Connection refused: connect
> 
>  faultActor: null
> 
>  faultDetail: 
> 
>       stackTrace: java.net.ConnectException: Connection refused: connect
> 
>  
> 
> Can you help me?
> 
>  
> 
> Thanks
> 
>  
> 
>  
> 
> João Simas
> 
> 


Mime
View raw message