INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Teamsite Webservice Client

Teamsite Webservice Client

(OP)
Hi,

I have written a client code in Java to access a SOAP based webservice. I am using Jax-ws. I have tested the code on my local machine and it works fine. It access the webservice and it gives the correct results back.
However, when I deploy the same code on Teamsite It is not working for me. Please Help!
Code reads the WSDL from one of the subfolder inside the project directory.

I have included following Jars into my project livesite-customer.jar livesite-runtime.jar jaxws-api-2.1.jar dom4j-1.6.1.jar

Java version is Java 6 on both my local and the one teamsite is using.

Crosssell_Service.java
package webservice.client;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;




@WebServiceClient(name = "CrossSellProcess", wsdlLocation = "src\\webservice\\client\\wsdl\\CrossSellProcess.wsdl",
targetNamespace = "...............m/process/interfaces/crosssell")
public class Crossell_Service extends Service {

public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://www.abc.com/process/interfaces/crosssell", "CrossSellProcess");
public final static QName CrossSellProcessSOAP = new QName("http://www.abc.com/process/interfaces/crosssell", "CrossSellProcessSOAP");

static {
URL url = Crossell_Service.class.getResource("src\\webservice\\client\\wsdl\\CrossSellProcess.wsdl");
if (url == null) {
java.util.logging.Logger.getLogger( Crossell_Service.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "CrossSellProcess.wsdl");
}
WSDL_LOCATION = url;
}


public Crossell_Service(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}

public Crossell_Service(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}

public Crossell_Service() {
super(WSDL_LOCATION, SERVICE);
}

/*@WebEndpoint(name = "CrossSellProcessSOAP")
public CrossSellProcess getCrossSellProcessSOAP() {
return super.getPort(CrossSellProcessSOAP, CrossSellProcess.class);
}*/


}


Crossell_client.java

public class Crosssell_Client {
private static final transient Log LOGGER = LogFactory.getLog (Crosssell_Client.class);
private static final QName SERVICE_NAME = new QName("http://www.abc.com/process/interfaces/crosssell", "CrossSellProcess");

....
....

private void getServiceName()
{
Document doc = Dom4jUtils.newDocument();
URL wsdlURL = Crossell_Service.WSDL_LOCATION;
Crossell_Service ss = new Crossell_Service(wsdlURL, SERVICE_NAME);
LOGGER.error("accessed the service Service Name is : " + ss.getServiceName());
doc.addElement("message").addCDATA("accessed the service Service Name is : " + ss.getServiceName());
return doc;
}
}

I am expecting a service name in my component as an output when I make an external call as below

<Data>
<External>
<Object Scope="local">webservice.client.Crosssell_Client</Object>
<Method>getServiceName</Method>
</External>
</Data

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close