[GitHub] kimmking commented on issue #1585: How to use standard cxf client to invoke Dubbo Webservice?

2018-04-23 Thread GitBox
kimmking commented on issue #1585: How to use standard cxf client to invoke 
Dubbo Webservice?
URL: 
https://github.com/apache/incubator-dubbo/issues/1585#issuecomment-383471465
 
 
   I think this is a bug.
   I will fix it later.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] chickenlj commented on issue #1585: How to use standard cxf client to invoke Dubbo Webservice?

2018-04-21 Thread GitBox
chickenlj commented on issue #1585: How to use standard cxf client to invoke 
Dubbo Webservice?
URL: 
https://github.com/apache/incubator-dubbo/issues/1585#issuecomment-383285826
 
 
   Shouldn't the endpoint address be added on your customized client?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


How to use standard cxf client to invoke Dubbo Webservice?

2018-04-13 Thread lixiaguang
 
I got a Dubbo Webservice WSDL Address. I want to use cxf client toinvoke.But 
when i run my code,I got some error "NullPointerException".here is my client 
code:
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceClient;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.log4j.Logger;
public class Test1 {
Logger log = Logger.getLogger(Test1.class);
public Object[] callWebService(String wsdl, String targetNamespace, String 
methodName, Object args[]) {
Object[] res = null;
try {
log.info("动态调用webservice开始,wsdl:" + wsdl + ",methodName:" + 
methodName + ",args:" + args);
JaxWsDynamicClientFactory dcf = 
JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(wsdl);
if (targetNamespace == null) {
res = client.invoke(methodName, args);
} else {
res = client.invoke(new QName(targetNamespace, 
methodName), args);
}
} catch (Exception e) {
log.error("动态调用webservice 失败,wsdl:" + wsdl + 
",targetNamespace:" + targetNamespace + ",methodName:"
+ methodName + ",args:" + args, e);
}
return res;
}
public static void main(String[] args) {
String wsdl = "http://xx:8080/TestService?wsdl;; // WSDL
String targetNamespace = "http://xx.com/;; // WSDL
String methodName = "getUserInfo";
Object params[] = {"id","1" };
Test1 client = new Test1();
Object[] res = client.callWebService(wsdl, targetNamespace, methodName, 
params);
System.out.println(res.toString());
}
Here is error:
java.lang.NullPointerException
at 
org.apache.cxf.transport.http.URLConnectionHTTPConduit.createConnection(URLConnectionHTTPConduit.java:109)
at 
org.apache.cxf.transport.http.URLConnectionHTTPConduit.setupConnection(URLConnectionHTTPConduit.java:122)
at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:499)
at 
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:297)


WSDL is missing endpoint address. provide configuration is here. How to add 
endpoint address? use annotation or user configution?
 
 
 



here is wsdl
http://www.w3.org/2001/XMLSchema; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/; xmlns:tns="http://test.com/; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/; 
xmlns:ns1="http://schemas.xmlsoap.org/soap/http; name="TestService" 
targetNamespace="http://test.com/;>
wsdl:types
http://www.w3.org/2001/XMLSchema; 
xmlns:tns="http://test.com/; attributeFormDefault="unqualified" 
elementFormDefault="qualified" targetNamespace="http://test.com/;>


xsd:sequence





xsd:sequence






















http://schemas.xmlsoap.org/soap/http"/>























*



[GitHub] lixiaguang commented on issue #1585: How to use standard cxf client to invoke Dubbo Webservice?

2018-04-11 Thread GitBox
lixiaguang commented on issue #1585: How to use standard cxf client to invoke 
Dubbo Webservice?
URL: 
https://github.com/apache/incubator-dubbo/issues/1585#issuecomment-380679730
 
 
   yes,it's missing endpoint address. provide configuration is here. How to add 
endpoint address? use annotation or user configution?
   ---



   
   
   
   
   
   here is wsdl
   -
   
   http://www.w3.org/2001/XMLSchema; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/; xmlns:tns="http://test.com/; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/; 
xmlns:ns1="http://schemas.xmlsoap.org/soap/http; name="TestService" 
targetNamespace="http://test.com/;>
 
   http://www.w3.org/2001/XMLSchema; 
xmlns:tns="http://test.com/; attributeFormDefault="unqualified" 
elementFormDefault="qualified" targetNamespace="http://test.com/;>
 
 
   
 
   
 
 
 
   
 
   
 
   
 
 
   
   
 
 
   
   
 
 
   
 
   
 
   
   
 
 
   http://schemas.xmlsoap.org/soap/http"/>
   
 
 
   
 
 
   
 
   
 
 
   
   
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] lixiaguang commented on issue #1585: How to use standard cxf client to invoke Dubbo Webservice?

2018-04-11 Thread GitBox
lixiaguang commented on issue #1585: How to use standard cxf client to invoke 
Dubbo Webservice?
URL: 
https://github.com/apache/incubator-dubbo/issues/1585#issuecomment-380679730
 
 
   yes,it's missing endpoint address. provide configuration is here. How to add 
endpoint address? use annotation or user configution?
   ---



   
   
   
   
   
   here is wsdl
   -
   
   http://www.w3.org/2001/XMLSchema; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/; xmlns:tns="http://test.com/; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/; 
xmlns:ns1="http://schemas.xmlsoap.org/soap/http; name="TestService" 
targetNamespace="http://test.com/;>
 
   http://www.w3.org/2001/XMLSchema; 
xmlns:tns="http://test.com/; attributeFormDefault="unqualified" 
elementFormDefault="qualified" targetNamespace="http://test.com/;>
 
 
   
 
   
 
 
 
   
 
   
 
   
 
 
   
   
 
 
   
   
 
 
   
 
   
 
   
   
 
 
   http://schemas.xmlsoap.org/soap/http"/>
   
 
 
   
 
 
   
 
   
 
 
   
   
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] kimmking commented on issue #1585: How to use standard cxf client to invoke Dubbo Webservice?

2018-04-11 Thread GitBox
kimmking commented on issue #1585: How to use standard cxf client to invoke 
Dubbo Webservice?
URL: 
https://github.com/apache/incubator-dubbo/issues/1585#issuecomment-380460364
 
 
   please show the wsdl file, I guess its endpoint address is missing


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] lixiaguang opened a new issue #1585: How to use standard cxf client to invoke Dubbo Webservice?

2018-04-10 Thread GitBox
lixiaguang opened a new issue #1585: How to use standard cxf client to invoke 
Dubbo Webservice?
URL: https://github.com/apache/incubator-dubbo/issues/1585
 
 
   I got a  Dubbo Webservice WSDL Address. I want to use cxf client 
toinvoke.But when i run my code,I got some error "NullPointerException".
   here is my client code:
   -
   import javax.xml.namespace.QName;
   import javax.xml.ws.WebServiceClient;
   
   import org.apache.cxf.endpoint.Client;
   import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
   import org.apache.log4j.Logger;
   
   import cn.com.shenhuagroup.xxgs.bigdata.test.builddata.BuildTestData;
   
   public class Test1 {
Logger log = Logger.getLogger(Test1.class);
   
public Object[] callWebService(String wsdl, String targetNamespace, 
String methodName, Object args[]) {
Object[] res = null;
try {
log.info("动态调用webservice开始,wsdl:" + wsdl + 
",methodName:" + methodName + ",args:" + args);
JaxWsDynamicClientFactory dcf = 
JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(wsdl);
if (targetNamespace == null) {
res = client.invoke(methodName, args);
} else {
res = client.invoke(new QName(targetNamespace, 
methodName), args);
}
   
} catch (Exception e) {
log.error("动态调用webservice 失败,wsdl:" + wsdl + 
",targetNamespace:" + targetNamespace + ",methodName:"
+ methodName + ",args:" + args, e);
}
return res;
}
   
public static void main(String[] args) {
String wsdl = "http://xx:8080/TestService?wsdl;; // WSDL
String targetNamespace = "http://xx.com/;; // WSDL
String methodName = "getUserInfo";
Object params[] = {"id","1" };
Test1 client = new Test1();
Object[] res = client.callWebService(wsdl, targetNamespace, 
methodName, params);
System.out.println(res.toString());
}
   }
   
   Here is error:
   ---
   java.lang.NullPointerException
at 
org.apache.cxf.transport.http.URLConnectionHTTPConduit.createConnection(URLConnectionHTTPConduit.java:109)
at 
org.apache.cxf.transport.http.URLConnectionHTTPConduit.setupConnection(URLConnectionHTTPConduit.java:122)
at 
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:499)
at 
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:297)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services