• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java WSDL2Constants类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.axis2.description.WSDL2Constants的典型用法代码示例。如果您正苦于以下问题:Java WSDL2Constants类的具体用法?Java WSDL2Constants怎么用?Java WSDL2Constants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WSDL2Constants类属于org.apache.axis2.description包,在下文中一共展示了WSDL2Constants类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: gzipCompressionInsideOutSequenceTest

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
@Test(groups = {"wso2.esb"}, description = "having 'Content-Encoding = gzip' within outsequence")
public void gzipCompressionInsideOutSequenceTest() throws Exception {
    ServiceClient client = getServiceClient(getProxyServiceURLHttp("sendingGZIPCompressedPayloadToClient"));
    client.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.MC_ACCEPT_GZIP, true);
    OMElement response = client.sendReceive(Utils.getStockQuoteRequest("GZIP"));
    OperationContext operationContext = client.getLastOperationContext();
    MessageContext inMessageContext = operationContext.getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN);
    CommonsTransportHeaders transportHeaders = (CommonsTransportHeaders) inMessageContext.getProperty(TRANSPORT_HEADERS);
    Assert.assertTrue(transportHeaders.containsKey(CONTENT_ENCODING), "Response Message not encoded");
    Assert.assertEquals(transportHeaders.get(CONTENT_ENCODING), "gzip", "Response Message not gzip encoded");
    Assert.assertTrue(response.toString().contains("GZIP"));
    Assert.assertTrue(response.toString().contains("GZIP Company"));

}
 
开发者ID:wso2,项目名称:product-ei,代码行数:15,代码来源:ESBJAVA2262ContentEncodingGzipTestCase.java


示例2: dispatchAndVerify

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
/**
 * Finds axis Service and the Operation for DSS requests
 *
 * @param msgContext request message context
 * @throws AxisFault if any exception occurs while finding axis service or operation
 */
private static void dispatchAndVerify(MessageContext msgContext) throws AxisFault {
    requestDispatcher.invoke(msgContext);
    AxisService axisService = msgContext.getAxisService();
    if (axisService != null) {
        httpLocationBasedDispatcher.invoke(msgContext);
        if (msgContext.getAxisOperation() == null) {
            requestURIOperationDispatcher.invoke(msgContext);
        }

        AxisOperation axisOperation;
        if ((axisOperation = msgContext.getAxisOperation()) != null) {
            AxisEndpoint axisEndpoint =
                    (AxisEndpoint) msgContext.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
            if (axisEndpoint != null) {
                AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisEndpoint
                        .getBinding().getChild(axisOperation.getName());
                msgContext.setProperty(Constants.AXIS_BINDING_OPERATION, axisBindingOperation);
            }
            msgContext.setAxisOperation(axisOperation);
        }
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:29,代码来源:IntegratorStatefulHandler.java


示例3: getOptions

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
protected Options getOptions(String action, boolean enableMTOM, String url) {
		Options options = new Options();
		options.setAction(action);		
	    options.setProperty(WSDL2Constants.ATTRIBUTE_MUST_UNDERSTAND,"1");
	    options.setTo( new EndpointReference(url) );
		options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
//		try {
//			String from = InetAddress.getLocalHost().getHostAddress();	
//			options.setFrom(new EndpointReference(from));
//		}catch(UnknownHostException e) {
//			//ignore From
//		}
		if (enableMTOM)
			options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
		else
			options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_FALSE);
		//use SOAP12, 
		options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
		return options;
	}
 
开发者ID:jembi,项目名称:openxds,代码行数:21,代码来源:XdsTest.java


示例4: extractBindingInformation

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
private static Binding extractBindingInformation(final AxisService service,
                                                 final Definition wsdlOfService,
                                                 final MessageContext inMessageContext) {
    AxisEndpoint currentEndpoint = (AxisEndpoint) inMessageContext
            .getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
    if (currentEndpoint == null) {
        String defaultEndpointName = service.getEndpointName();
        currentEndpoint = service.getEndpoints().get(defaultEndpointName);
        if (currentEndpoint == null) {
            throw new NullPointerException("AxisEndpoint cannot be null.");
        }
    }

    AxisBinding currentAxisBinding = currentEndpoint.getBinding();
    QName bindingQName = currentAxisBinding.getName();

    return wsdlOfService.getBinding(bindingQName);
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:19,代码来源:BPELMessageContextFactory.java


示例5: waitForReply

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
private void waitForReply(MessageContext messageContext, DatagramSocket datagramSocket,
                          String contentType) throws IOException {

    // piggy back message constant is used to pass a piggy back
    // message context in asnych model
    if (!(messageContext.getAxisOperation() instanceof OutInAxisOperation) &&
            messageContext.getProperty(org.apache.axis2.Constants.PIGGYBACK_MESSAGE) == null) {
        return;
    }

    byte[] inputBuffer = new byte[4096]; //TODO set the maximum size parameter
    DatagramPacket packet = new DatagramPacket(inputBuffer, inputBuffer.length);
    datagramSocket.receive(packet);

    // create the soap envelope
    try {
        MessageContext respMessageContext = messageContext.getOperationContext().
                getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN);
        InputStream inputStream = new ByteArrayInputStream(inputBuffer, 0, packet.getLength());
        SOAPEnvelope envelope = TransportUtils.createSOAPMessage(respMessageContext,
                inputStream, contentType);
        respMessageContext.setEnvelope(envelope);
    } catch (XMLStreamException e) {
        throw new AxisFault("Can not build the soap message ", e);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:27,代码来源:UDPSender.java


示例6: createMessageContext

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public MessageContext createMessageContext() throws AxisFault {
    MessageContext msgContext = listener.createMessageContext();
    
    if (service != null) {
        msgContext.setAxisService(service);

        // find the operation for the message, or default to one
        Parameter operationParam = service.getParameter(BaseConstants.OPERATION_PARAM);
        QName operationQName = (
            operationParam != null ?
                BaseUtils.getQNameFromString(operationParam.getValue()) :
                BaseConstants.DEFAULT_OPERATION);

        AxisOperation operation = service.getOperation(operationQName);
        if (operation != null) {
            msgContext.setAxisOperation(operation);
            msgContext.setAxisMessage(
                    operation.getMessage(WSDL2Constants.MESSAGE_LABEL_IN));
            msgContext.setSoapAction("urn:" + operation.getName().getLocalPart());
        }
    }
    return msgContext;
}
 
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:24,代码来源:ProtocolEndpoint.java


示例7: testAddDataFromURL

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
/**
 * 
 * @throws Exception
 */
public void testAddDataFromURL() throws Exception{

    Options options= TestUtil.getArchiveTestOptions();
    // setting test case dependent settings
    options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/add/{data1}");
    options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
    options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

    ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
    String stringPayload = "<addDataFromURL xmlns=\"http://jaxrs.apache.org\"><data1>account</data1></addDataFromURL>";
    OMElement payload= AXIOMUtil.stringToOM(stringPayload);
    OMElement respond=sender.sendReceive(payload);
    OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
    assertEquals("account created", returnElem.getText() );

  }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:21,代码来源:ArchiveDeploymentTest.java


示例8: testAddDataFromURLandBody

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testAddDataFromURLandBody() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURLandBody xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account and password created", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例9: testUpdateDataFromURL

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testUpdateDataFromURL() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/update/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_PUT);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURL xmlns=\"http://jaxrs.apache.org\"><data1>account</data1></addDataFromURL>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account updated", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例10: testUpdateDataFromURLandBody

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testUpdateDataFromURLandBody() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_PUT);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURLandBody xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account and password updated", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例11: testGetDataFromURL

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testGetDataFromURL() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/get/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_GET);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<getDataFromURL xmlns=\"http://jaxrs.apache.org\"><data1>account</data1></getDataFromURL>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account read", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例12: testGetDataFromURLandBody

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testGetDataFromURLandBody() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_GET);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURLandBody xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account and password read", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例13: testDeleteDataFromURL

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testDeleteDataFromURL() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/delete/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_DELETE);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<deleteDataFromURL xmlns=\"http://jaxrs.apache.org\"><data1>account</data1></deleteDataFromURL>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account deleted", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例14: testDeleteDataFromURLandBody

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testDeleteDataFromURLandBody() throws Exception{

        Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_DELETE);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<addDataFromURLandBody xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("account and password deleted", returnElem.getText() );

      }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例15: testCheckServicesXMLoverriding

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testCheckServicesXMLoverriding() throws Exception{

            Options options= TestUtil.getArchiveTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"serviceroot/check");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_APPLICATION_XML);

            ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
            String stringPayload = "<checkServicesXMLoverriding xmlns=\"http://jaxrs.apache.org\"><data1>account</data1><data2>password</data2></checkServicesXMLoverriding>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
            assertEquals("account and password correct", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例16: testCheckTypepublishing

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testCheckTypepublishing() throws Exception{
    
    Options options= TestUtil.getArchiveTestOptions();
        // setting test case dependent settings
        options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot");
        options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
        options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

        ServiceClient sender= TestUtil.getArchiveTestServiceClient(options);
        String stringPayload = "<checkTypePublishing xmlns=\"http://jaxrs.apache.org\">null</checkTypePublishing>";
        OMElement payload= AXIOMUtil.stringToOM(stringPayload);
        OMElement respond=sender.sendReceive(payload);
        OMElement returnElem=respond.getFirstChildWithName(new QName("http://jaxrs.apache.org","return"));
        assertEquals("true",returnElem.getText());

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ArchiveDeploymentTest.java


示例17: testAddDataFromURL

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testAddDataFromURL() throws Exception{

            Options options= TestUtil.getPojoTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/add/{data1}");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

            ServiceClient sender= TestUtil.getPojoTestServiceClient(options);
            String stringPayload = "<addDataFromURL xmlns=\"http://ws.apache.org/axis2\"><data1>account</data1></addDataFromURL>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("return"));
            assertEquals("account created", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:PojoTest.java


示例18: testAddDataFromURLandBody

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testAddDataFromURLandBody() throws Exception{

            Options options= TestUtil.getPojoTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_POST);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

            ServiceClient sender= TestUtil.getPojoTestServiceClient(options);
            String stringPayload = "<addDataFromURLandBody xmlns=\"http://ws.apache.org/axis2\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("return"));
            assertEquals("account and password created", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:PojoTest.java


示例19: testUpdateDataFromURL

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testUpdateDataFromURL() throws Exception{

            Options options= TestUtil.getPojoTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/update/{data1}");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_PUT);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

            ServiceClient sender= TestUtil.getPojoTestServiceClient(options);
            String stringPayload = "<addDataFromURL xmlns=\"http://ws.apache.org/axis2\"><data1>account</data1></addDataFromURL>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("return"));
            assertEquals("account updated", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:PojoTest.java


示例20: testUpdateDataFromURLandBody

import org.apache.axis2.description.WSDL2Constants; //导入依赖的package包/类
public void testUpdateDataFromURLandBody() throws Exception{

            Options options= TestUtil.getPojoTestOptions();
            // setting test case dependent settings
            options.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION,"testroot/getFromBody/{data1}");
            options.setProperty(Constants.Configuration.HTTP_METHOD,Constants.Configuration.HTTP_METHOD_PUT);
            options.setProperty(Constants.Configuration.CONTENT_TYPE, Constants.MIME_CT_TEXT_XML);

            ServiceClient sender= TestUtil.getPojoTestServiceClient(options);
            String stringPayload = "<addDataFromURLandBody xmlns=\"http://ws.apache.org/axis2\"><data1>account</data1><data2>password</data2></addDataFromURLandBody>";
            OMElement payload= AXIOMUtil.stringToOM(stringPayload);
            OMElement respond=sender.sendReceive(payload);
            OMElement returnElem=respond.getFirstChildWithName(new QName("return"));
            assertEquals("account and password updated", returnElem.getText() );

          }
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:PojoTest.java



注:本文中的org.apache.axis2.description.WSDL2Constants类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ImplicitNamingStrategyJpaCompliantImpl类代码示例发布时间:2022-05-22
下一篇:
Java ArrowLocation类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap