• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Exception thrown while invoke .NET service from Java client

 
Greenhorn
Posts: 21
Hibernate Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had post the exception while to invoke .NET web service from java client.
Cant able to find out what is the exact problem behind this exception.
Please help me to resolved.

"SOAPException: faultCode=SOAP-ENV:IOException; msg=ModuleException thrown by HTTPClient while posting.HTTPClient.AuthSchemeNotImplException: NTLM; targetException=java.io.IOException: ModuleException thrown by HTTPClient while posting.HTTPClient.AuthSchemeNotImplException: NTLM"
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exactly how did you construct this client software?

Specific toolkit? Are you starting with a WSDL provided by the service?

Bill
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post your client code snippet...

Re: If you're calling a .NET webservice, whats the return type of the exposed webmethod?

As a general advice, you need a build request XML using a parser and hit the webservice and also get the object from the webservice, and parse it back again.

 
Pene charl
Greenhorn
Posts: 21
Hibernate Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not using any tool like AXIS.
Just using JDeveloper to create client stub and also got the WSDL service discription from server side,that WSDL generated based on .net.So it had used document style.
Is there any interoperability problem between .net and java?
When i make request to "https" service that's showed the exception.

I put my code snippet of client stub here:



//Initialization
m_httpConnection = new OracleSOAPHTTPConnection();
props.put(OracleSOAPHTTPConnection.PROXY_AUTH_TYPE, "basic");
props.put(OracleSOAPHTTPConnection.PROXY_USERNAME, "username");
props.put(OracleSOAPHTTPConnection.PROXY_PASSWORD, "password");
props.put(OracleSOAPHTTPConnection.PROXY_HOST, "host address");
props.put(OracleSOAPHTTPConnection.PROXY_PORT, "port no");
m_httpConnection.setProperties(props);
private String _endpoint = "https://URL/URN";

public String getEndpoint()
{
return _endpoint;
}

public void setEndpoint(String endpoint)
{
_endpoint = endpoint;
}

public String functionName(String Parameters) throws Exception
{
URL endpointURL = new URL(_endpoint);

Envelope requestEnv = new Envelope();
Body requestBody = new Body();
Vector requestBodyEntries = new Vector();

String wrappingName = "functionName";
String targetNamespace = "https: URL";
Vector requestData = new Vector();
requestData.add(new Object[] {"WSDL element", parameter passed by function});
requestData.add(new Object[] {"WSDL element", parameter passed by function});
......
requestBodyEntries.addElement(toElement(wrappingName, targetNamespace, requestData));
requestBody.setBodyEntries(requestBodyEntries);
requestEnv.setBody(requestBody);

Message msg = new Message();
msg.setSOAPTransport(m_httpConnection);
msg.send(endpointURL, "https://URL/URN(ie.functionName)", requestEnv);

Envelope responseEnv = msg.receiveEnvelope();
Body responseBody = responseEnv.getBody();
Vector responseData = responseBody.getBodyEntries();
return (String)fromElement((Element)responseData.elementAt(0), java.lang.String.class);
}


Please help me to resolve.
 
Pene charl
Greenhorn
Posts: 21
Hibernate Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pene charl wrote:I am not using any tool like AXIS.
Just using JDeveloper to create client stub and also got the WSDL service discription from server side,that WSDL generated based on .net.So it had used document style.
Is there any interoperability problem between .net and java?
When i make request to "https" service that's showed the exception.

I put my code snippet of client stub here:



//Initialization
m_httpConnection = new OracleSOAPHTTPConnection();
props.put(OracleSOAPHTTPConnection.PROXY_AUTH_TYPE, "basic");
props.put(OracleSOAPHTTPConnection.PROXY_USERNAME, "username");
props.put(OracleSOAPHTTPConnection.PROXY_PASSWORD, "password");
props.put(OracleSOAPHTTPConnection.PROXY_HOST, "host address");
props.put(OracleSOAPHTTPConnection.PROXY_PORT, "port no");
props.put("javax.net.ssl.trustStore", "/localdirectorypath");
props.put("javax.net.ssl.trustStorePassword", "password");
m_httpConnection.setProperties(props);
private String _endpoint = "https://URL/URN";

public String getEndpoint()
{
return _endpoint;
}

public void setEndpoint(String endpoint)
{
_endpoint = endpoint;
}

public String functionName(String Parameters) throws Exception
{
URL endpointURL = new URL(_endpoint);

Envelope requestEnv = new Envelope();
Body requestBody = new Body();
Vector requestBodyEntries = new Vector();

String wrappingName = "functionName";
String targetNamespace = "https: URL";
Vector requestData = new Vector();
requestData.add(new Object[] {"WSDL element", parameter passed by function});
requestData.add(new Object[] {"WSDL element", parameter passed by function});
......
requestBodyEntries.addElement(toElement(wrappingName, targetNamespace, requestData));
requestBody.setBodyEntries(requestBodyEntries);
requestEnv.setBody(requestBody);

Message msg = new Message();
msg.setSOAPTransport(m_httpConnection);
//Exception Occured here
msg.send(endpointURL, "https://URL/URN(ie.functionName)", requestEnv);
Envelope responseEnv = msg.receiveEnvelope();
Body responseBody = responseEnv.getBody();
Vector responseData = responseBody.getBodyEntries();
return (String)fromElement((Element)responseData.elementAt(0), java.lang.String.class);
}


Please help me to resolve.

 
Pene charl
Greenhorn
Posts: 21
Hibernate Oracle Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I resolved that problem..
That issue based on JDeveloper.
Thanks to all ..
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Pene

I am facing a similar problem.
Could you please detail what problems were you facing using jDeveloper.
Could you please send your code as well so that i can refer to it.
Thanks.

Regards
Sachin
 
Pene charl
Greenhorn
Posts: 21
Hibernate Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sachin,
The problem arose because i missed out some Jdeveloper specific JAR files,which is needed for the web service development in JDeveloper.
So you should make sure to included all the JAR files.
 
What does a metric clock look like? I bet it is nothing like this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic