在耳朵中包装的多Maven Web模块是8.5给我jaxbexception这个班级在此上下文中不知道
有多Maven模块罐子和战争,我使用Maven将这些模块包装到EAR中,并在WebSphere 8.5上部署,当我发送请求时,特定Web模块中发生的问题发生在特定的Web模块中,请给我这个例外:
javax.xml.bind.jaxbexception:com.fawryis.ebpp.fawryswitch.businessfacade.processrequest在此上下文中不知道
我的Web Module Jaxb对象:
package com.fawryis.ebpp.fawryswitch.businessfacade;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.fawry_eg.ebpp.ifxmessages.FAWRYType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "processRequest", namespace = "http://businessfacade.fawryswitch.ebpp.fawryis.com/", propOrder = {"arg0"})
public class ProcessRequest {
protected FAWRYType arg0;
/**
* Gets the value of the arg0 property.
*
* @return possible object is {@link FAWRYType }
*
*/
public FAWRYType getArg0() {
return arg0;
}
/**
* Sets the value of the arg0 property.
*
* @param value allowed object is {@link FAWRYType }
*
*/
public void setArg0(FAWRYType value) {
this.arg0 = value;
}
}
我的Web Module POM.XML:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.fawryis</groupId>
<artifactId>Wallet</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>PaymentWebService</artifactId>
<packaging>war</packaging>
<name>PaymentWebService</name>
<description>Source of Fund PaymentWebService.</description>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>FawryIFXMessagesModulesDataModel</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>GeneralDataModel</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>PosSofejbClient</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>PosSofExceptions</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>Logger</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>CommonConstants</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>PosSofConstants</artifactId>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>WebContent\WEB-INF</directory>
<!-- <directory>src/main/resources</directory> -->
</resource>
</resources>
<finalName>PaymentWebService</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven
defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>WebContent\WEB-INF\web.xml</webXml>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
SOAP请求:soap请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bus="http://businessfacade.fawryswitch.ebpp.fawryis.com/">
<soapenv:Header/>
<soapenv:Body>
<bus:processRequest>
<!--Optional:-->
<arg0>
<Request>
<SignonRq>
<ClientDt>2011-06-08T12:00:00</ClientDt>
<CustLangPref>en-gb</CustLangPref>
<SuppressEcho>false</SuppressEcho>
<SignonProfile>
<Sender>FAWRY</Sender>
<Receiver>60</Receiver>
<MsgCode>InvalidateCacheRq</MsgCode>
<Version>V1.0</Version>
</SignonProfile>
</SignonRq>
<UtilSvcRq>
<RqUID>f37bec7e-7090-c244-4321-824d115d8001</RqUID>
<AsyncRqUID>11112222-3333-4444-5555-111122332300</AsyncRqUID>
<MsgRqHdr>
<NetworkTrnInfo>
<OriginatorCode>TANMYAH</OriginatorCode>
<TerminalId>33933</TerminalId>
</NetworkTrnInfo>
<ClientTerminalSeqId>1</ClientTerminalSeqId>
<CustomProperties>
<CustomProperty>
<Key>PosSerialNumber</Key>
<Value>456457457</Value>
</CustomProperty>
</CustomProperties>
</MsgRqHdr>
<InvalidateCacheRq/>
</UtilSvcRq>
</Request>
</arg0>
</bus:processRequest>
</soapenv:Body>
</soapenv:Envelope>
There are multi maven modules jars and wars and I package these modules into EAR using maven and deploy it on WebSphere 8.5, the problem happened within specific web module has soap service when I send request give me this exception:
javax.xml.bind.JAXBException: com.fawryis.ebpp.fawryswitch.businessfacade.ProcessRequest is not known to this context
My web module jaxb object:
package com.fawryis.ebpp.fawryswitch.businessfacade;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.fawry_eg.ebpp.ifxmessages.FAWRYType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "processRequest", namespace = "http://businessfacade.fawryswitch.ebpp.fawryis.com/", propOrder = {"arg0"})
public class ProcessRequest {
protected FAWRYType arg0;
/**
* Gets the value of the arg0 property.
*
* @return possible object is {@link FAWRYType }
*
*/
public FAWRYType getArg0() {
return arg0;
}
/**
* Sets the value of the arg0 property.
*
* @param value allowed object is {@link FAWRYType }
*
*/
public void setArg0(FAWRYType value) {
this.arg0 = value;
}
}
My web module pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.fawryis</groupId>
<artifactId>Wallet</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>PaymentWebService</artifactId>
<packaging>war</packaging>
<name>PaymentWebService</name>
<description>Source of Fund PaymentWebService.</description>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>FawryIFXMessagesModulesDataModel</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>GeneralDataModel</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>PosSofejbClient</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>PosSofExceptions</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>Logger</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>CommonConstants</artifactId>
</dependency>
<dependency>
<groupId>com.fawryis</groupId>
<artifactId>PosSofConstants</artifactId>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>WebContent\WEB-INF</directory>
<!-- <directory>src/main/resources</directory> -->
</resource>
</resources>
<finalName>PaymentWebService</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven
defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>WebContent\WEB-INF\web.xml</webXml>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
SOAP request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bus="http://businessfacade.fawryswitch.ebpp.fawryis.com/">
<soapenv:Header/>
<soapenv:Body>
<bus:processRequest>
<!--Optional:-->
<arg0>
<Request>
<SignonRq>
<ClientDt>2011-06-08T12:00:00</ClientDt>
<CustLangPref>en-gb</CustLangPref>
<SuppressEcho>false</SuppressEcho>
<SignonProfile>
<Sender>FAWRY</Sender>
<Receiver>60</Receiver>
<MsgCode>InvalidateCacheRq</MsgCode>
<Version>V1.0</Version>
</SignonProfile>
</SignonRq>
<UtilSvcRq>
<RqUID>f37bec7e-7090-c244-4321-824d115d8001</RqUID>
<AsyncRqUID>11112222-3333-4444-5555-111122332300</AsyncRqUID>
<MsgRqHdr>
<NetworkTrnInfo>
<OriginatorCode>TANMYAH</OriginatorCode>
<TerminalId>33933</TerminalId>
</NetworkTrnInfo>
<ClientTerminalSeqId>1</ClientTerminalSeqId>
<CustomProperties>
<CustomProperty>
<Key>PosSerialNumber</Key>
<Value>456457457</Value>
</CustomProperty>
</CustomProperties>
</MsgRqHdr>
<InvalidateCacheRq/>
</UtilSvcRq>
</Request>
</arg0>
</bus:processRequest>
</soapenv:Body>
</soapenv:Envelope>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论