Call webservice without input message

Hi.
I have webservice which doesn't need input message. For example stack cleaner.
<wsdl:message name="eraseStackRequest">
</wsdl:message>
<wsdl:message name="eraseStackResponse">
<wsdl:part element="impl:result" name="result"/>
</wsdl:message>
<wsdl:portType name="Stack">
<wsdl:operation name="eraseStack">
<wsdl:input message="impl:eraseStackRequest" name="eraseStackRequest"/>
<wsdl:output message="impl:eraseStackResponse" name="eraseStackResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="StackSOAPSoapBinding" type="impl:Stack">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="eraseStack">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="eraseStackRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="eraseStackResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
Is there possibility call this service from BPEL. JDeveloper require input message.
When I create input variable and assign value to it, I get error.
Thanks.

You can try something like this:
Variables:
<variables>
<!-- Reference to the message passed as input during initiation -->
<variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
<!-- Reference to the message that will be sent back to the requester during callback -->
<variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
</variables>
Assign:
<assign name="EmptyAssign">
<copy>
<from variable="inputVariable" part="payload" query="/ns1:Balance/ns1:Empty"/>
<to variable="outputVariable" part="payload" query="/ns1:Balance/ns1:Empty"/>
</copy>
</assign>
The xsd user:
<?xml version="1.0" encoding="windows-1252"?>
<schema xmlns:tns="http://xmlns.oracle.com/bpel/samples/Dummy"
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/bpel/samples/Dummy"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<element name="Empty"/>
<element name="Balance">
<complexType>
<sequence>
     <element name="Empty"/>
<element name="Message" type="tns:messageType"/>
</sequence>
</complexType>
</element>
<complexType name="messageType">
<sequence>
<element name="subject" type="xsd:string"/>
<element name="content" type="xsd:string"/>
<element name="address" type="xsd:string"/>
</sequence>
</complexType>
</schema>
]

Similar Messages

  • Call WebService without BPM

    Hi Guru.
    I need your help.
    This is my scenario:
    1) PI 7.1 reads a file va FTP
    2) with the contetn of this file the system calls a WS
    3) with the response of the WS I need to write a file via FTP
    How can I do this without BPM?
    Thanks
    Manuel Chiarelli

    Hii
    You can very well do this.
    File adapter for file send/receive.
    SOAP adapter for web service.
    this should help u out more
    RFC Scenario using BPM --Starter Kit
    I think RFC Lookup is the best solution to your problem. Going for BPM might give performance issue.
    Use this crazy piece for any RFC Mapping Lookups!

  • Inbound Service Interface without Input Request Message

    Is it possible to create an Inbound Service Interface without Input Request Message?  We are trying to create a web service to get all records from a database table hence no input parameter is needed.  We have tried in both XI 7.0 and PI 7.1 but couldn't do it.  Is this scenario not supported by ESR or am I missing something?  Any hint will be appreciated.
    Regards,
    Jiannan

    In the scenario I described in my initial post the table structure is only needed in the response message to receive the data. 
    For a web service generated from a RFC function module using the service creation wizard (SE80) a table parameter is automatically included in the request message.  I can understand this as the wizard can not figure out if the table parameter is needed in the request message or not.
    I have tried to use the service creation wizard to generate a web service from the function module RFCPING that has no input or output parameters.  As shown in below WSDL segment the WSDL does allow not having any input or output parameters.
    - <wsdl:types>
    - <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style">
    - <xsd:element name="Rfcping">
    - <xsd:complexType>
      <xsd:sequence />
      </xsd:complexType>
      </xsd:element>
    - <xsd:element name="RfcpingResponse">
    - <xsd:complexType>
      <xsd:sequence />
      </xsd:complexType>
      </xsd:element>
      </xsd:schema>
      </wsdl:types>
    - <wsdl:message name="Rfcping">
      <wsdl:part name="parameters" element="tns:Rfcping" />
      </wsdl:message>
    - <wsdl:message name="RfcpingResponse">
      <wsdl:part name="parameter" element="tns:RfcpingResponse" />
      </wsdl:message>
    Thanks,
    Jiannan

  • Multi-part input message problem in webservice Proxy generator

    While generating a java proxy for an Oracle Access Manager Identity XML operation I get the following.
    Generating proxy
    WARNING: ignoring operation "OblixIDXML_um_modifyUser": input message with multiparts is not WS-I compliant and is not currently supported
    Proxy generation finished
    See wsdl (document\litteral) fragment:
         <message name="OblixIDXMLInput">
              <part name="authentication" element="oblix:authentication"/>
              <part name="request" element="oblixxmllocalschema:request"/>
         </message>
    It is poosibel to generate the Proxy when the authentication part is removed from the message.
    My question: Are there work arounds for generating a client with Jdev (10.1.3) that can be deployed on SOA suite 10.1.3 (this service call is part of a composite service).
    For instance calling proxy generator from command line like a wsdl2java (Axis like) or editing some (generated) source code files after generating the service with one part removed.
    Regards,
    Bert

    While generating a java proxy for an Oracle Access Manager Identity XML operation I get the following.
    Generating proxy
    WARNING: ignoring operation "OblixIDXML_um_modifyUser": input message with multiparts is not WS-I compliant and is not currently supported
    Proxy generation finished
    See wsdl (document\litteral) fragment:
         <message name="OblixIDXMLInput">
              <part name="authentication" element="oblix:authentication"/>
              <part name="request" element="oblixxmllocalschema:request"/>
         </message>
    It is poosibel to generate the Proxy when the authentication part is removed from the message.
    My question: Are there work arounds for generating a client with Jdev (10.1.3) that can be deployed on SOA suite 10.1.3 (this service call is part of a composite service).
    For instance calling proxy generator from command line like a wsdl2java (Axis like) or editing some (generated) source code files after generating the service with one part removed.
    Regards,
    Bert

  • Defining input message Type for webservice interface with out input

    Hi all,
    I am configuring a scenario RFC -> XI -> Webservice. My sync webservice doesnot need any input. it genrates a random number which needs to be sent back to the RFC. How can i define an input message data type with out any data? As the interface requires both input and output data types in XI?
    I tried a dummy data type with a single string input and didn't map it. but its not working because of name space issues. i specified a seperate XML name space in Message Type but i get a Target URL as the name space in the request which i provided in the SOAP reciever adapter.
    Any help will be appriciated
    Thanks and best regards,
    Kulwant Singh

    Hi
    Can u chk the webservice request using test tools like stylus studio or xml spy and ensure that the same request is going out of XI .
    make sure that you have changed the default xml namesapce in the target MT.
    rgds
    Arun

  • Error while calling WebService inside ISchedulerTask.

    Hi,
    Env: NW 2004s
      I have a requirement of calling webservice frequently. I developed a portal project with scheduler, where the application gives a runtime error while calling/reading the property file (which is generated during the webservice proxy generation, without it webservice call is impossible).
    I have varified the ear file which contains all the required class files and config files including property file.
    fyi:
    portalapp.xml file looks like this.
    +
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal"/>
      </application-config>
      <components/>
      <services>
        <service name="RFServiceWrapper">
          <service-config>
            <property name="className" value="com.sap.netweaver.rf.wrapper.RFServiceWrapper"/>
            <property name="startup" value="true"/>
          </service-config>
        </service>
      </services>
    </application>
    +
    Any input will be highly appreciated.
    Thanks,
      Vinod

    Following is the error message:
    msg1:
    at <package>.AFFERAAFWSServiceImpl.<init>(AFFERAAFWSServiceImpl.java:10)
    msg2:
    at com.sap.engine.services.webservices.jaxrpc.wsdl2java.ServiceBase.loadProtocolsFromPropertyFile(ServiceBase.java:238)
    Reporting from Logs and Traces.
    Error Located @ following code inside AFFERAAFWSServiceImpl.java, which is a proxy class generated using apache axis
    input = this.getClass().getClassLoader().getResourceAsStream("<package>/protocols.txt");
    loadProtocolsFromPropertyFile(input);
    protocols.txt is another config file generated along with AFFERAAFWSServiceImpl.java, which is been used @ run time.
    FYI: All these files are present on ear file.

  • Calling Webservice from SAP ME

    Hi
    I have searched the forum unfortunately I am not able to find an answer to my question.
    Basically, I would like to call an external System from SAP ME via web service. I am thinking to use Collaboration Link  for this purpose. For example COLLABORATION_SHOPORDER_RELEASE, I would like to trigger the Web service.
    What should I do? Where Can I get the documentation about this (edit: I have found it in SDK) ? Do I need SDK for it (writting own code)?
    This is not SAPMEINT or any ERP integration, it is just custom systtem integration. I appreciate any recomendation.
    Thanks
    Edited by: Seng Kiang Hoe on Jul 21, 2011 11:19 AM
    what I have done are
    1. Created a collaborative directive maintenance with just simple HTTP transport (synchronized set to true)
    2. In the HTTP transport parameter I inserted the
    url=http://xxx:50000/XMII/Runner?Transaction=EquipmentIntegration/trx_CreateOrder
    3. In Collaboration Link, I linked COLLABORATION_SHOPORDER_RELEASE to the Directive maintenance I have created.
    4. When I releases shop order Internal error occur
    Any idea?  The url above works. I just want to trigger the MII transaction without input.
    Edited by: Seng Kiang Hoe on Jul 21, 2011 2:01 PM

    Hi Ivan
    Thank you for answering, but I think you misunderstood what I am looking for.
    The plug-ins are already there in ME. For example Transport, I am using Simple HTTP Transport to call an Outbound HTTP. In this case this HTTP is an MII's transaction.
    I want to call this WebService each time when I release shop therefore in COllaboration Link Maintenace I have the Trigger Action Collaboration_Shop_Order_Create link to the Collaboration I have created.
    I do not want to call MII's transaction with SoapUI but with SAP ME.
    Any Idea how I could do it? If you still do not understand what I mean, please let me know. I will try my best to explain it again.
    The error that i got from trace
    javax.ejb.EJBException: (Failed in component: sap.com/meear) Exception raised from invocation of public void com.sap.me.collaboration.CollaborationDirectiveMsgBean.onMessage(javax.jms.Message) method on bean instance com.sap.me.collaboration.CollaborationDirectiveMsgBean@17d8a085 for bean sap.com/meearxml|me.integration.collaboration.ejb-5.2.4.8-Base.jarxml|CollaborationDirectiveMsgBean in application sap.com/meear.; nested exception is: javax.ejb.TransactionRolledbackLocalException: (Failed in component: sap.com/meear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.collaboration.CollaborationHandlerSOBean.processMessage(com.sap.me.collaboration.CollaborationMessage) throws com.sap.me.collaboration.CollaborationException method on bean instance com.sap.me.collaboration.CollaborationHandlerSOBean@4d4b93a7 for bean sap.com/meearxml|me.integration.collaboration.ejb-5.2.4.8-Base.jarxml|CollaborationHandlerSO in application sap.com/meear.; nested exception is: com.sap.me.collaboration.CollaborationConfigurationException: Invalid collaboration configuration: Invalid collaboration configuration: Plug-in not defined. When processing CollaborationMessage: site = 101841, action = COLLABORATION_SHOPORDER_MODIFIED messageID: ID:0067D2B600000072-00000000000185c268202:1314ed962dc:-7fee directive = TRANSPORT_ACTIVITY_BO[java.lang.String]=ActivityBO:SIMPLE HTTP TRANSP
    ENABLE_SYNCH_PROCESSING[java.lang.String]=false
    MODIFIED_DATE_TIME[com.visiprise.globalization.impl.IcuDateTime]=2011-07-22T11:46:33.000Z
    HANDLE[java.lang.String]=CollaborationDirectiveBO:101841,TEST_SHOP_ORDER_RELEASE
    TRANSPORT_PARAMETERS[java.lang.String]=url=http://server:50000/XMII/Runner?Transaction=EquipmentIntegration/Auftrag_Process/trx_CreateOrder&IllumLoginName=test&IllumLoginPassword=test&session=false
    T_PLUG_INFO[com.sap.me.frame.Data]=  ENABLED[java.lang.String]=true
      ACTIVITY[java.lang.String]=SIMPLE HTTP TRANSP
      CLASS_OR_PROGRAM[java.lang.String]=com.sap.me.collaboration.SimpleHTTPTransport
    Edited by: Seng Kiang Hoe on Jul 22, 2011 1:53 PM
    Edited by: Seng Kiang Hoe on Jul 22, 2011 1:56 PM

  • How to update the Input message data in OSM

    hi,
    I am using OSM 7.0.2.
    can we update input message data before the orchestration execution.
    I want to add some more order line item to the input xml by calling some external webservice.
    Suppose CRM submits order with 3 order line item. Now once we have that in Input message i want to add some more order line item to this input message.
    I dont want to add processing/adapter layer above OSM that does the updation of the XML.
    Thanks in advance.
    Rutvej

    Hi Rutvej,
    You use Order Data Rule to generate data for the creation view of the orchestration order. The source schema of the Order Data Rule is the schema for the incoming message. The output returns the <_root> portion of the creation view. Note that the Order Template already has the Sales Order (look for "order <XML>") and automatically populated by OSM Core. So, what you are trying to do is not to add/change the Sales Order itself, but to first add the desired enriching data model into Order Template, and then use Order Data Rule to populate those enriching data into the Order Template.
    Example of Order Data Rule:
    declare namespace cso="http://xmlns.oracle.com/communications/sce/dictionary/CentralOMManagedServices-Orchestration/CustomerSalesOrder";
    let $customer := //cso:CustomerAccount
    return
    <_root>
         <OrderHeader>
              <AccountIdentifier>{$customer/cso:AccountID/text()}</AccountIdentifier>
         </OrderHeader>
         <EnrichedOrderItem>
              <Data1>Your enriched data here</Data1>
              <Data2>Your enriched data here</Data2>
         </EnrichedOrderItem>
    </_root>
    Before that, you would need to add the OrderHeader and EnrichedOrderItem into the Order Template.

  • Asynchronous WebService without PI

    It is possible to develop a asynchronous WebService in a SAP System ECC 6.0 and call this WebService from a client without PI?
    We donu2019t want to use techniques like LUW,...
    Business Scenario: Call WebService -> Quick Answer (Thatu2019s why we want to use Asy. WS) -> WebService Business logic starts different calculations -> No WebService Response Message favoured except Http 200 response from Asynch. WS

    Dear spantaleoni,
    Thanks for your quick answer.
    Please can you describe how can I declare a client destination?
    Thanks in advance

  • Calling webservice in udf for inserting data into webservice

    Dear Experts,
          Please give me the drawbacks of using lookup function for inserting data. we are calling a webservice from the udf for inserting the data using a webservice.
    It is a file to jdbc usnig a soap lookup . we use this approach because we need to pass the response from webservice along with the error data to the jdbc.   is there any other way to do it without using bpm ?
        In the udf we are creating the xml structure for webservice and passing the parameters through arguments.
    is there a better approach for this ?
    Thanks,
    Aju

    Hi Aju,
    You can do it without BPM.
    Write UDF for Soap Lookup. Parse the response message from Webservice.  and map the required values to respective fields.
    See the weblog
    Webservice Calls From a User Defined Function.
    Negative point of this solution is that it will take some time to call Webservice and get response back from it.
    Kulwinder

  • Creating JCD - unable to specify Scheduler as Input Message

    Hi *
    When I try to create a New Collaboration Definition (Java), and specify Create New Web Service Operation, I get to the point where I must Select Input Message. Here I want to use the Scheduler. But when I go into the SeeBeyond project, and click on eGate, I only see JMS and OTD Lead as the choices.
    How can I get to the Scheduler?
    Thanks,
    Pete

    Hey Pete,
    What version of JCAPS are you using?? 5.1.3 or 6?
    In 5.1.3 the only scheduler is a JMS scheduler. If you want to schedule a webservice, the only (quick) way I can think of to schedule it would be to write a web service client, and then use cron (in unix) or the windows scheduler to kick that web service client off at a certain time. You could also use the jms scheduler (the scheduler isn't great in 5.1.3, you can't say "I want this to run on the 2nd Sunday of each month") that makes a JCD start up every so many seconds/hours/days/weeks(that takes in a JMS message, and then calls your webservice)
    If you're interested in any of those two scenarios and need more help, please let me know.
    In JCAPS 6, it's a little more flexible. If you're using JCA or JBI components (not repository based components) check out this tutorial on what is offered in 6:
    http://blogs.sun.com/javacapsfieldtech/entry/java_caps_6_scheduler_for
    Hope any of that helps,
    --Adam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Report without input screen working diffrently in debugging and background

    hai,frds
    I have one report without input-screen,But it is working diffrently in background and debugger.
    please help me for this  and i am bapi inside the program to create entries.but
    if its in debugging it is crates corectly but if is in back ground it not working cooetly bapi working one time only.
    plese help me  for this.
    Moderator Message: Too much of text-speak/sms-speak. Thread Locked. Write complete words and check their spellings using the Spell-Check tool in the editor here.
    Edited by: kishan P on Jan 19, 2012 4:40 PM

    HI,
    In SM37,Put the cursor on the Job, Type 'JDBG' in Command line and press Enter.
    You can able to debug your Background job now.
    Find out where it is going wrong.....
    how to debug background job

  • XML Error while calling webservice from oracle function.

    I am getting an error while I am trying to call webservice from oracle function. Any ideas? Thanks.
    select get_new_string ('proxy:80', 'http://xxx/PatternVariations/SourceTest/WebMethods','Scott') from dual
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00225: end-element tag "H4" does not match start-element tag "P"
    Error at line 9
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at "DORSBP00.DEMO_SOAP", line 82
    ORA-06512: at "DORSBP00.GET_NEW_STRING", line 11

    The error message implies that the web service is returning something that is not well formed xml. Can you verify what is being returned by the web service call

  • Empty document found. Proceed without sending message

    Hi All,
    I have a file CC and it works fine , simple file.
    But when I add Trailer to it... then I have no output file..Instead the CC channel shows that the document is empty and cannot proceed:
    Here is the details ( Watch the Trailer added)
    ZOUT_MT 11 -ZIN_MT 11
    Recordset 1--1
    Rec 1unboundedTest01 1-----unbounded
    key(string) 1...1----
    key 1..1(string)
    name11(string) 1..1----
    name21 1..1(string)
    name12(string) 1..1----
    name22 1..1(string)
    Trail 1...1 -
    Trail 1---1
    key(string) 1..1 -
    key 1..1(string)
    test(string) 1...1 -
    test1..1 (string)
    In Config: Sender File CC
    Doc Name :ZOUT_MT
    Doc namspace : http://mytest.com/test1
    RecordsetName : Recordset
    Recordset Structure : Rec,*,Trail,1
    Key Field Name : key
    Recordset per message : 1
    Rec.fieldNames : key,name11,name12
    Rec.fieldSeparator : ,
    Rec.endSeparator : 'nl'
    Rec.processConfiguration: FromConfiguration
    Rec.keyFieldValue : 1
    Trail.fieldNames: key,test
    Trail.endSeparator: 'nl'
    Trail.processConfiguration : FromConfiguration
    Trail.keyFieldValue : 1
    Trail.fieldSeparator : ,
    From all this work above , when I put the file having:
    1,111,112
    1,222,223
    1,333,334
    1,99
    The output file in empty (null)...
    Does anyone out there understand why the output file is becoming null..
    here is the log I get in workbecnh (commuunication channel)
    Audit Log for Message: c1a434f5-ad9f-4a26-08c1-e7d579a5927a
    Time Stamp Status Description
    21.01.2009 11:48:22 Success Channel ztest_sender_cc: Entire file content converted to XML format
    21.01.2009 11:48:22 Warning Channel ztest_sender_cc: Empty document found. Proceed without sending message
    21.01.2009 11:48:22 Success File "/mylocation/interface/SCM/somefolder/in/shilpagirlsinput.txt" deleted after processing

    keyFieldValue must be different for Rec and Trail, keyfield is to distinguish Rec and Trail, their value must be different, otherwise how can you tell which record is Rec, and which is Trail?
    Try to put different keyfield value, chang the input file and run the scenario.
    Also because you specified cardinality 1...1 for Trail element, and 1 is used as keyfield for Rec, XI thinks there is no Trail in the outbound file, thus it produces empty document warning as Trail is required to be present by cardinality 1...1
    Jayson

  • Error when call webservice on servlet

    Hi All,
    I'm having a problem when calling webservice inside the servlet on the WebLogic environment.
    My code:
    * Webservice:
    package ws;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.Date;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.sql.DataSource;
    @WebService
    public class getData {
    public getData() {
    super();
    @WebMethod
    public String getHello() {
    return "HELLO HELLO";
    private Connection getConn() throws NamingException, SQLException {
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource)ic.lookup("jdbc/hnxwebsite");
    //System.out.println("POOL !!!!");
    Connection con = ds.getConnection();
    con.setAutoCommit(false);
    return con;
    @WebMethod
    public String getIndexData(@WebParam(name="param") String param) {
    StringBuffer sb = new StringBuffer();
    String sql =
    "Select * From idx_index_info iii where iii.index_code= ?";
    Connection con = null;
    PreparedStatement pstmt = null;
    ResultSet rs = null;
    try {
    con = getConn();
    pstmt = con.prepareStatement(sql);
    pstmt.setString(1, param);
    rs = pstmt.executeQuery();
    int columnCount = rs.getMetaData().getColumnCount();
    Object val;
    while (rs.next()) {
    for (int i = 1; i < columnCount; i++) {
    //System.out.println(i);
    val = rs.getObject(i);
    if (val != null)
    sb.append(val.toString() + "\n");
    } catch (SQLException e) {
    e.printStackTrace();
    } catch (NamingException e) {
    e.printStackTrace();
    } finally {
    try {
    if (rs != null)
    rs.close();
    if (pstmt != null)
    pstmt.close();
    if (con != null)
    con.close();
    } catch (Exception e) {
    e.printStackTrace();
    String str = sb.toString();
    int len = str.length();
    //System.out.println("LENGTH >>>>"+len);
    return str;
    public static void main(String[] arg) {
    Date date = new Date();
    System.out.println(date.toGMTString());
    getData gd = new getData();
    System.out.println(date.toGMTString());
    //System.out.println(gd.getIndexData("ACB"));
    * WebClient:
    package hnx;
    import java.util.Date;
    import java.util.Map;
    import javax.xml.namespace.QName;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPBodyElement;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.ws.BindingProvider;
    import javax.xml.ws.Dispatch;
    import javax.xml.ws.Service;
    import javax.xml.ws.WebServiceException;
    import javax.xml.ws.soap.SOAPBinding;
    public class wsClient {
    public wsClient() {
    super();
    public String procWeb() {
    String strmsg = null;
    try {
    QName serviceName = new QName("http://192.168.60.18:7001/","getDataService");
    // QName for Port As defined in wsdl.
    QName portName = new QName("http://192.168.60.18:7001/","getDataPort");
    // //Endpoint Address
    String endpointAddress = "http://192.168.60.18:7001/WsIndex/getDataPort?wsdl";
    // Create a dynamic Service instance
    Service service = Service.create(serviceName);
    service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
    endpointAddress);
    // Create a dispatch instance
    Dispatch<SOAPMessage> dispatch = service.createDispatch(portName,
    SOAPMessage.class, Service.Mode.MESSAGE);
    // Use Dispatch as BindingProvider
    BindingProvider bp = (BindingProvider) dispatch;
    // Optionally Configure RequestContext to send SOAPAction HTTP Header
    Map<String, Object> rc = bp.getRequestContext();
    rc.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
    rc.put(BindingProvider.SOAPACTION_URI_PROPERTY, "http://ws/");
    // Obtain a preconfigured SAAJ MessageFactory
    MessageFactory factory = ((SOAPBinding) bp.getBinding())
    .getMessageFactory();
    // Create SOAPMessage Request
    SOAPMessage request = factory.createMessage();
    // Request Body
    SOAPBody body = request.getSOAPBody();
    // Compose the soap:Body payload
    QName payloadName = new QName("http://ws/", "getIndexData","ns1");
    SOAPBodyElement payload = body.addBodyElement(payloadName);
    SOAPElement message = payload.addChildElement( "param");
    message.addTextNode("HNX302");
    request.saveChanges();
    // Invoke the endpoint synchronously
    System.out.println(message);
    SOAPMessage reply = null;
    try { // Invoke Endpoint Operation and read response
    reply = dispatch.invoke(request);
    } catch (WebServiceException wse) {
    wse.printStackTrace();
    // process the reply
    SOAPBody bodyRes = reply.getSOAPBody();
    SOAPBodyElement nextSoapBodyElement = (SOAPBodyElement) bodyRes
    .getChildElements().next();
    SOAPElement soapElement = (SOAPElement) nextSoapBodyElement
    .getChildElements().next();
    strmsg = soapElement.getValue();
    System.out.println("AAA >>"+strmsg);
    } catch (Exception wse) {
    wse.printStackTrace();
    return strmsg;
    public static void main(String[] arg) {
    wsClient ws = new wsClient();
    Date date = new Date();
    System.out.println(date.toGMTString());
    System.out.println(ws.procWeb());
    System.out.println(date.toGMTString());
    * Servlet:
    package hnx;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import ws.GetData;
    import ws.GetDataPortClient;
    import ws.GetDataService;
    public class getIndex extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html; charset=UTF-8";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response) throws ServletException,
    IOException {
    doGet(request, response);
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException,
    IOException {
    response.reset();
    response.flushBuffer();
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    // GetDataService service = new GetDataService();
    // GetData getData = service.getGetDataPort();
    // String str = getData.getIndexData("HNX302");
    // int length = str.length();
    // response.setContentLength(length);
    wsClient ws = new wsClient();
    String str = ws.procWeb();
    try {
    out.println(str);
    } catch (Exception e) {
    e.printStackTrace();
    out.close();
    ERROR: >>>>>[Another instance of the application is running on the server.  JDeveloper redeploy the application.]
    [Application SClient stopped but not undeployed from Server Instance IntegratedWebLogicServer]
    [Running application SClient on Server Instance IntegratedWebLogicServer...]
    [03:41:48 PM] ---- Deployment started. ----
    [03:41:48 PM] Target platform is (Weblogic 10.3).
    [03:41:48 PM] Retrieving existing application information
    [03:41:48 PM] Running dependency analysis...
    [03:41:48 PM] Deploying 2 profiles...
    [03:41:48 PM] Wrote Web Application Module to C:\Users\W7\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\o.j2ee\drs\SClient\sgetDataWebApp.war
    [03:41:48 PM] Wrote Enterprise Application Module to C:\Users\W7\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\o.j2ee\drs\SClient
    [03:41:49 PM] Redeploying Application...
    [03:41:49 PM] Application Redeployed Successfully.
    [03:41:49 PM] The following URL context root(s) were defined and can be used as a starting point to test your application:
    [03:41:49 PM] http://192.168.9.100:7101/SClient
    [03:41:49 PM] Elapsed time for deployment: 1 second
    [03:41:49 PM] ---- Deployment finished. ----
    Run startup time: 1380 ms.
    [Application SClient deployed to Server Instance IntegratedWebLogicServer]
    Target URL -- http://127.0.0.1:7101/SClient/getindex
    [param: null]
    javax.xml.ws.WebServiceException: com.ctc.wstx.exc.WstxIOException: Exceeding stated content length of 228
         at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:117)
         at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:165)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:101)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
         at com.sun.xml.ws.client.Stub.process(Stub.java:248)
         at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:189)
         at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:215)
         at hnx.wsClient.procWeb(wsClient.java:75)
         at hnx.getIndex.doGet(getIndex.java:40)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: com.ctc.wstx.exc.WstxIOException: Exceeding stated content length of 228
         at com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1687)
         at com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:585)
         at com.sun.xml.ws.message.saaj.SAAJMessage.writeTo(SAAJMessage.java:396)
         at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:114)
         ... 29 more
    Caused by: java.net.ProtocolException: Exceeding stated content length of 228
         at weblogic.net.http.ContentLengthOutputStream.write(ContentLengthOutputStream.java:39)
         at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:96)
         at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
         at com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
         at com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:1685)
         ... 32 more
    java.lang.NullPointerException
         at hnx.wsClient.procWeb(wsClient.java:82)
         at hnx.getIndex.doGet(getIndex.java:40)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Can anyone help?
    Thanks in advance.
    LTThoi

    I'm no webservices/servlet expert , but can you check the obvious out here -
    javax.xml.ws.WebServiceException: com.ctc.wstx.exc.WstxIOException: Exceeding stated content length of 228
    at ......
    at hnx.wsClient.procWeb(wsClient.java:75)+ // check if you are passign something thats more than 228 chars
    at hnx.getIndex.doGet(getIndex.java:40)

Maybe you are looking for