Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Exception while deploying webservice on jboss 4.2.1 using jax-ws

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have tried TOP-DOWN approach.
I have WSDL file and used the following command for generating the remote interface and client side artifacts

wsconsume -k mcafeeAdapterContract.wsdl

Following is my WSDL file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<definitions

name="VendorOrderService"

targetNamespace="http://smo.xsd.covad.com/vendororder";

xmlns="http://schemas.xmlsoap.org/wsdl/";

xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";

xmlns:xsd="http://www.w3.org/2001/XMLSchema";

xmlns:tns="http://smo.xsd.covad.com/vendororder">;

<types>

<xsd:schema

targetNamespace="http://smo.xsd.covad.com/vendororder";

elementFormDefault="qualified">

<xsd:element name="vendorOrderException" type="tns:VendorOrderException"/>

<xsd:element name="processVendorOrder" type="tns rocessVendorOrder"/>

<xsd:element name="processVendorOrderResponse" type="tns rocessVendorOrderResponse"/>

<xsd:complexType name="ProcessVendorOrder">

<xsd:sequence>

<xsd:element name="vendorOrder" type="tns:VendorOrder"/>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="ProcessVendorOrderResponse">

<xsd:sequence>

<xsd:element name="return" type="tns:VendorOrder" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="VendorOrderException">

<xsd:sequence>

<xsd:element name="errorCode" type="xsd:int"/>

<xsd:element name="errorDescription" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="VendorOrder">

<xsd:sequence>

<xsd:element name="orderID" type="xsd:int"/>

<xsd:element name="vendorID" type="xsd:int"/>

<xsd:element name="vendorOrderID" type="xsd:string" minOccurs="0"/>

<xsd:element name="orderReceivedDate" type="xsd ateTime"/>

<xsd:element name="contractAcceptedFlag" type="xsd:boolean" minOccurs="0"/>

<xsd:element name="contractAcceptedDate" type="xsd ateTime" minOccurs="0"/>

<xsd:element name="productLanguageCode" type="xsd:string"/>

<xsd:element name="client" type="tns:Client" minOccurs="0"/>

<xsd:element name="lineItem" type="tns:LineItem" minOccurs="0" maxOccurs="unbounded"/>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="Client">

<xsd:sequence>

<xsd:element name="clientID" type="xsd:int"/>

<xsd:element name="salutation" type="xsd:string" minOccurs="0"/>

<xsd:element name="email" type="xsd:string" minOccurs="0"/>

<xsd:element name="password" type="xsd:string" minOccurs="0"/>

<xsd:element name="firstName" type="xsd:string" minOccurs="0"/>

<xsd:element name="lastName" type="xsd:string" minOccurs="0"/>

<xsd:element name="phone" type="tns honeNumber" minOccurs="0"/>

<xsd:element name="fax" type="tns honeNumber" minOccurs="0"/>

<xsd:element name="companyName" type="xsd:string" minOccurs="0"/>

<xsd:element name="streetAddress1" type="xsd:string" minOccurs="0"/>

<xsd:element name="streetAddress2" type="xsd:string" minOccurs="0"/>

<xsd:element name="unit" type="xsd:string" minOccurs="0"/>

<xsd:element name="city" type="xsd:string" minOccurs="0"/>

<xsd:element name="state" type="tns:State" minOccurs="0"/>

<xsd:element name="zip" type="tns:Zip" minOccurs="0"/>

<xsd:element name="zip4" type="tns:Zip4" minOccurs="0"/>

<xsd:element name="countryCode" type="xsd:string" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="PhoneNumber">

<xsd:sequence>

<xsd:element name="areaCode" type="tns:AreaCode" minOccurs="0"/>

<xsd:element name="prefix" type="tns refix" minOccurs="0"/>

<xsd:element name="suffix" type="tns:Suffix" minOccurs="0"/>

<xsd:element name="extension" type="tns:Extension" minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="LineItem">

<xsd:sequence>

<xsd:element name="clientServiceID" type="xsd:int"/>

<xsd:element name="productID" type="xsd:int"/>

<xsd:element name="vendorProductID" type="xsd:string"/>

<xsd:element name="quantity" type="xsd:int"/>

<xsd:element name="lineItemNumber" type="xsd:int"/>

<xsd:element name="lineItemAction" type="tns:LineItemAction"/>

<xsd:element name="parameter" type="tns arameter" minOccurs="0" maxOccurs="unbounded"/>

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="Parameter">

<xsd:sequence>

<xsd:element name="name" type="xsd:string"/>

<xsd:element name="value" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

<xsd:simpleType name="LineItemAction">

<xsd:restriction base="xsd:string">

<xsd:enumeration value="INSTALL"/>

<xsd:enumeration value="CHANGE"/>

<xsd:enumeration value="DISCONNECT"/>

</xsd:restriction>

</xsd:simpleType>

<xsd:simpleType name="AreaCode">

<xsd:restriction base="xsd:string">

<xsd attern value="[0-9]{3}"/>

</xsd:restriction>

</xsd:simpleType>

<xsd:simpleType name="Prefix">

<xsd:restriction base="xsd:string">

<xsd attern value="[0-9]{3}"/>

</xsd:restriction>

</xsd:simpleType>

<xsd:simpleType name="Suffix">

<xsd:restriction base="xsd:string">

<xsd attern value="[0-9]{4}"/>

</xsd:restriction>

</xsd:simpleType>

<xsd:simpleType name="Extension">

<xsd:restriction base="xsd:string">

<xsd attern value="[0-9]*"/>

</xsd:restriction>

</xsd:simpleType>

<xsd:simpleType name="State">

<xsd:restriction base="xsd:string">

<xsd attern value="[A-Z]{2}"/>

</xsd:restriction>

</xsd:simpleType>

<xsd:simpleType name="Zip">

<xsd:restriction base="xsd:string">

<xsd attern value="[0-9]{5}"/>

</xsd:restriction>

</xsd:simpleType>

<xsd:simpleType name="Zip4">

<xsd:restriction base="xsd:string">

<xsd attern value="[0-9]{4}"/>

</xsd:restriction>

</xsd:simpleType>

</xsd:schema>

</types>

<message name="ProcessVendorOrder">

<part name="input" element="tns rocessVendorOrder"/>

</message>

<message name="ProcessVendorOrderResponse">

<part name="output" element="tns rocessVendorOrderResponse"/>

</message>

<message name="VendorOrderException">

<part name="fault" element="tns:vendorOrderException"/>

</message>

<portType name="VendorOrderPort">

<operation name="processVendorOrder">

<input message="tns rocessVendorOrder"/>

<output message="tns rocessVendorOrderResponse"/>

<fault name="VendorOrderException" message="tns:VendorOrderException"/>

</operation>

</portType>

<binding name="VendorOrderBinding" type="tns:VendorOrderPort">

<soap:binding transport="http://schemas.xmlsoap.org/soap/http"; style="document"/>

<operation name="processVendorOrder">

<soap peration/>

<input>

<soap:body use="literal"/>

</input>

<output>

<soap:body use="literal"/>

</output>

<fault name="VendorOrderException">

<soap:fault name="VendorOrderException" use="literal"/>

</fault>

</operation>

</binding>

<service name="VendorOrderService">

<port name="VendorOrderPort" binding="tns:VendorOrderBinding">

<soap:address location="http://localhost:8080/mcafeeAdapter"/>;

</port>

</service>

</definitions>


Following is my Remote Interface

import javax.jws.WebMethod;
import javax.jws.WebService;


import java.rmi.Remote;
import java.rmi.RemoteException;


/**
* JBossWS Generated Source
*
* Generation Date: Tue Oct 23 09:29:51 IST 2007
*
* This generated source code represents a derivative work of the input to
* the generator that produced it. Consult the input for the copyright and
* terms of use that apply to this source code.
*
* JAX-WS Version: 2.0
*
*/
@WebService(name = "VendorOrderPort", targetNamespace = "http://smo.xsd.covad.com/vendororder";)
public interface VendorOrderPort extends Remote{


/**
*
* @param vendorOrder
* @return
* returns com.covad.xsd.smo.vendororder.VendorOrder
* @throws RemoteException
*/
@WebMethod
public VendorOrder processVendorOrder(
VendorOrder vendorOrder)
throws RemoteException;

}


Following is my Implementation class of webservice

import org.apache.commons.logging.Log;

import org.apache.commons.logging.LogFactory;

//import com.covad.xsd.smo.vendororder.VendorOrderPort;

import javax.jws.WebService;
//import javax.jws.WebMethod;
//import javax.jws.WebParam;
//import javax.jws.WebResult;


@WebService(endpointInterface="com.covad.xsd.smo.vendororder.VendorOrderPort",name = "VendorOrderPort")
public class macafeeAdapter {



private static Log logger = LogFactory.getLog("com.covad.mcafee.adapter");


public VendorOrder processVendorOrder(VendorOrder vendorOrder) {



// logger.info("Entering mcafeeadapter.processVendorOrder() with "+vendorOrder.xmlText());

logger.info("Entering mcafeeadapter.processVendorOrder() with ");

McAfeeProxy mcAfeeProxy = new McAfeeProxy();

VendorOrder res = mcAfeeProxy.processVendorOrder(vendorOrder);

logger.info("COMPLETE");

return res;

}

}

I am using JBoss 4.2.1 Application server and Jbossws 2.0.1 and used JAXB 2.0 for generating schema classes.

Now when i tried to deploy the application
I am getting the following exception

10:46:07,747 ERROR [MainDeployer] Could not start deployment: file:/D:/jboss-4.2
.1.GA/server/default/deploy/mcafeeAdapter.war
java.lang.IllegalStateException: Cannot find endpoint meta data for: MacafeeAdapter
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.getEndpointM
etaData(UnifiedMetaDataDeploymentAspect.java:117)
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(Unifi
edMetaDataDeploymentAspect.java:86)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy
(DeploymentAspectManagerImpl.java:115)
at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDep
loyerHook.java:97)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInt
erceptor.java:90)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy45.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
run(AbstractDeploymentScanner.java:225)

Structure of my application is
mcafeeAdapter.war
|_WEB-INF
|_classes
|_wsdl
|_lib
|_web.xml


Contents of Web.xml

<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<servlet>
<servlet-name>MacafeeAdapter</servlet-name>
<servlet-class>com.covad.mcafee.adapter.webservice.macafeeAdapter</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>MacafeeAdapter</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

</web-app>


I am not getting where the problem.

Please help me.

Thanks in Advance.
 
Whatever. Here's a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic