-
1. Re: how to publish a webservice with SOAPProxy and chain request message?
rephia Sep 23, 2013 5:04 AM (in response to rephia)Would you give me some advise please?
Here is my jboss-esb.xml
========================================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd" parameterReloadSecs="5"><services>
<service category="Proxy_Basic" name="Proxy"
description="Basic WebService Proxy"
invmScope="GLOBAL">
<listeners>
<http-gateway name="Proxy_Basic-GwListener" />
</listeners>
<actions mep="RequestResponse" inXsd="/request.xsd" outXsd="/response.xsd" faultXsd="/fault.xsd" validate="false"><!-- -->
<action name="echo-request"
class="org.jboss.soa.esb.actions.SystemPrintln">
<property name="message" value="Message before SOAPProxy" />
</action>
<action name="proxy" class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy">
<property name="wsdl" value="http://localhost:8080/TestService/TestService?wsdl"/>
<property name="SOAPAction" value="sayHello"/>
<property name="wsdlUseHttpClientProperties" value="true"/>
</action>
<action name="echo-response" class="org.jboss.soa.esb.actions.SystemPrintln">
<property name="message" value="Message after SOAPProxy" />
</action>
</actions>
</service>
</services></jbossesb>
My external webservice definition looks like this:
===============================================================================
package org.jboss.samples.webservices;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;@WebService()
@SOAPBinding(style = Style.RPC)
public class TestService {@WebMethod(action="sayHello")
public String sayHello(String name) throws Exception {
String response = name + name;System.out.println(response);
return response;
}
}request.xsd
=====================================================================================
<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHello" xmlns:x1="http://www.jboss.org/sayHello" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="sayHello" type="x1:sayHello"/>
<xs:complexType name="sayHello">
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
response.xsd
=========================================================================================
<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHello" xmlns:x1="http://www.jboss.org/sayHello" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="sayHelloResponse" type="x1:sayHelloResponse"/>
<xs:complexType name="sayHelloResponse">
<xs:sequence>
<xs:element name="arg0" type="xs:string" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
fault.xsd
================================================================================
<xs:schema version="1.0" targetNamespace="http://www.jboss.org/sayHi" xmlns:x1="http://www.jboss.org/sayHi" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="sayFault" type="x1:fault"/>
<xs:complexType name="fault">
<xs:sequence>
<xs:element name="code" type="xs:string"/>
<xs:element name="faultString" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
-
2. Re: how to publish a webservice with SOAPProxy and chain request message?
rephia Sep 23, 2013 5:35 AM (in response to rephia)