<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Java,J2EE,Weblogic,Oracle

    java項(xiàng)目隨筆
    隨筆 - 90, 文章 - 6, 評(píng)論 - 61, 引用 - 0
    數(shù)據(jù)加載中……

    axis 調(diào)用 c++ 的 webservice

    package com.test.axis;

    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;

    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceException;


    public class GroupCallChatClient {
     /**
      *
      * @param phoneno   手機(jī)號(hào)碼
      * @param ORGANISE_ID   渠道ID
      * @param serviceId   業(yè)務(wù)編碼
      * @return
      */
     
     public static int callWebservice(String phoneno, String ORGANISE_ID,String serviceId){
      /*1表示已訂購(gòu),0表示沒有訂購(gòu),3表示配置錯(cuò)誤,4接口傳入?yún)?shù)存在問題,5.數(shù)據(jù)庫(kù)錯(cuò)誤  6錯(cuò)誤 */
      int flag = 6;
      
      String endpoint = "http://211.96.25.137:9091/";
         Service service = new Service();
         Call call = null;
        
         try { 
       call = (Call)service.createCall();
      
         call.setTargetEndpointAddress(endpoint);
        

         call.setOperationName(new QName("http://www.qnuse.com/query_inerface", "query"));
         call.addParameter( "account-id",new QName("http://www.w3.org/2001/XMLSchema", "string"),javax.xml.rpc.ParameterMode.IN);
         call.addParameter( "order-way-id",new QName("http://www.w3.org/2001/XMLSchema", "string"),javax.xml.rpc.ParameterMode.IN);
         call.addParameter( "service-id",new QName("http://www.w3.org/2001/XMLSchema", "string"),javax.xml.rpc.ParameterMode.IN);
         call.setReturnClass(int.class);
        
         Object _resp = call.invoke(new Object[]{phoneno, ORGANISE_ID, serviceId});
        
         if (_resp != null && !"".equals(_resp)){
          flag =  ((Integer) _resp).intValue();
         }   
         System.out.println(phoneno+"---->群呼群聊,返回值:" + flag );
       
      } catch (Exception e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       System.out.println("群呼群聊出錯(cuò): " + e);
      }
        
     
      
      return flag;
      
     }

    }




    c++  的 webservice   的 wsdl

    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="QUERY_inerface"
     targetNamespace="http://www.qnuse.com/query_inerface.wsdl"
     xmlns:tns="http://www.qnuse.com/query_inerface.wsdl"
     xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:orderI="http://www.qnuse.com/query_inerface"
     xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
     xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
     xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
     xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
     xmlns="http://schemas.xmlsoap.org/wsdl/">

    <types>

     <schema targetNamespace="http://www.qnuse.com/query_inerface"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:orderI="http://www.qnuse.com/query_inerface"
      xmlns="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="unqualified"
      attributeFormDefault="unqualified">
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
     </schema>

    </types>

    <message name="queryRequest">
     <part name="account-id" type="xsd:string"/>
     <part name="order-way-id" type="xsd:string"/>
     <part name="service-id" type="xsd:string"/>
    </message>

    <message name="queryResponse">
     <part name="result" type="xsd:int"/>
    </message>

    <portType name="QUERY_inerfacePortType">
     <operation name="query">
      <documentation>Service definition of function orderI__query</documentation>
      <input message="tns:queryRequest"/>
      <output message="tns:queryResponse"/>
     </operation>
    </portType>

    <binding name="QUERY_inerface" type="tns:QUERY_inerfacePortType">
     <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
     <operation name="query">
      <SOAP:operation style="rpc" soapAction=""/>
      <input>
         <SOAP:body use="encoded" namespace="http://www.qnuse.com/query_inerface" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
         <SOAP:body use="encoded" namespace="http://www.qnuse.com/query_inerface" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
     </operation>
    </binding>

    <service name="QUERY_inerface">
     <documentation>gSOAP 2.7.7 generated service definition</documentation>
     <port name="QUERY_inerface" binding="tns:QUERY_inerface">
      <SOAP:address location="http://10.130.28.3:9093/"/>
     </port>
    </service>

    </definitions>

    posted on 2010-08-25 12:01 龔椿深 閱讀(860) 評(píng)論(0)  編輯  收藏


    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲欧洲精品成人久久奇米网| 国产精品美女自在线观看免费 | 亚洲一级在线观看| 最近中文字幕大全免费视频 | 久久精品国产亚洲AV大全| 久久免费观看国产精品| 亚洲AV天天做在线观看| 最近中文字幕免费2019| 亚洲人成电影网站| 在线A级毛片无码免费真人| 欧美好看的免费电影在线观看| 亚洲嫩草影院在线观看| 成人影片麻豆国产影片免费观看| 四虎必出精品亚洲高清| 四虎影库久免费视频| 国产高清视频免费在线观看| 亚洲av永久无码精品国产精品 | 美女一级毛片免费观看 | 亚洲高清无在码在线电影不卡| 4hu四虎最新免费地址| 亚洲精品成a人在线观看夫| 亚洲精品无码久久久| 久久久久久久岛国免费播放 | 国产午夜成人免费看片无遮挡| 亚洲人成在线播放网站岛国| jizz在线免费观看| 亚洲成人免费在线| 最近中文字幕无吗免费高清 | 最近中文字幕高清免费中文字幕mv| 亚洲一区二区三区高清不卡| 免费少妇a级毛片人成网| 国产免费拔擦拔擦8X高清在线人 | 日本免费人成视频播放| 亚洲依依成人精品| 国产免费黄色大片| 免费无遮挡无码永久视频| 亚洲GV天堂无码男同在线观看| 国产av无码专区亚洲av果冻传媒| 又黄又大的激情视频在线观看免费视频社区在线| 亚洲午夜久久久久久久久久| 国产精品无码免费播放|