Problem in creating excel J2EE module for file adapter
Hi All,
I have created an J2EE project for Excel File Reading and added all the required libraries , build an ear of it and also referenced libraries in j2ee.engine.xml of ear , deployed the ear in J2ee engine of XI . Now i am trying to use this module in communication sender channel like this
localejbs/ExcelFileAdapter
ExcelFileAdapter(JNDI Name)
I am using this module name before callsapadapter but nothing is happening , my excel file not getting picked up from the desired location. Can someone tell me where i did things wrong.
Thanx in Advance,
Trax
Thats part of my bean class code:
public ModuleData process(
ModuleContext mc,
ModuleData imd)
throws ModuleException {
Object obj = null;
Message msg = null;
String msgType = null;
String nameSpace = null;
try {
obj = imd.getPrincipalData();
msg = (Message) obj;
msgType = (String) mc.getContextData("msgType");
nameSpace = (String) mc.getContextData("nameSpace");
if (msg.getMessageDirection()== MessageDirection.INBOUND)
amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
else
amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.OUTBOUND);
XMLPayload xp = msg.getDocument();
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Now got the xml payload object.");
I think their is a some problem before 1st audit message is logged.
Similar Messages
-
How to create a module for File Adapter
Hi,
I read somethings about module in Adapters.
What I need to create a EJB? I need to generate a jar? Where I put it?
Do they have anything about this or a step by step? I want to create a module fpr File Adapter
Tks.Hi,
>>>What I need to create a EJB?
If you have NDS or Ecclipse you can create them automatically.
>>>I need to generate a jar?
Yes you need to generate a .Jar for that Ejb.
>>>Where I put it?
Put that .Jar in .Ear file. and then deploy it on to the Xi server or PCK or Decentralised Adapter Engine where ever u want to use.
>>>Do they have anything about this or a step by step?
Yes.Step by step procedure for creating module is available.You can get them at the links given above by others.
Regards,
Gowtham K. -
Adapter Module for File Adapter
I have a scenario where I have 2 related files (text file and a pdf file) for the message. I need to enhance the payload (content conversion from text file) with the size of the pdf file. I have developed a adapter module for this and it is working fine if there is 1 set of text and pdf file. But if there are more than 1 set of files, it is processing the first set and giving the below error for other files.
"Error: com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback."
Regards
Yogeshcheck this thread :
BaseTransactionRolledbackLocalException in custom adapter module
Exceptions in Recievr Communication Channel with Adapter Module -
Adapter Module for File Adapter using Eclipse
I want to develop Adapter Module using Eclipse, please let me know if it is possible?
-How to use Eclipse to develop adapter module and deploy it on J2ee server.
ThanksHi,
If you have NWDS , then you can directly deploy AM in PI server, if you are using eclipse to write code then genarate EAR file of your code, then you have to deploy in SDM using manual process.
SEARCH IN SDN like how to deplot AM's, you will find many documents.
Regards,
RAJ -
Problem with Creation of Source module for MS Access
I am having a problem in creating a source module connected with an "MS Access" file in OWB 9i using the heterogeneous services. I have created a DSN to an access file (.mdb) and created the HS in Oracle (modified the tsnames.ora and listener.ora files with required details). Created a Database link using this service and it's working fine in SQL PLUS, but I am unable to create a Source module in OWB 9i using this db link, since OWB 9i need a schema name for db link. In MS access it's not possible to have a schema.
Please help me in solving the above issue.
Thanks in advance
JaganWhat version of OWB and Oracle database are you using? If it is an OWB version 9.0.4 or higher, I presume you are trying to create a non Oracle source module under the Oracle Database node - is this the case? If yes, you should not do that, but create your MS Access module under Databases->Other->Other node (as I understand you are not using ODBC). Let me know if my assumptions are correct.
Regards:
Igor -
Directory specification for File Adapter
Hello,
I would like to ask if it is possible to determine a directory where message is saved for file adapter based on message content.
E.g. I have general directory (GD) under which I would like to save a messages in directories with are called based on vendor number what is part of a message.
So a message would be saved in
...\GD\vendor number\file name.
In case that vendor number directory is not created yet I need to create it.
I know that in file adapter a directory name is constant and file name can differ based on settings.
This behaviour is in Business Connector enabled through possibility to write an "user-exit" in Java for directory determination.
Is something similar possible in XI ?
We are currently running on XI 3.0 with external adapter engine version 2.0 but to use internal adapter engine is no problem for me.
Thank you for your advice.
Marian MorzolHi Marian,
You can do this with content based routing in the interface determination, but then you have to create a new interface/channel for every extra directory.
Cheers,
Frank -
Time stamp is not getting updated for File Adapter in communication channel
Hi All,
Since yesterday, I am observing that the time stamp of communication channel for File adapter is not gettingupdated some times.
I had to stop and start the communication channel to update the time stamp.Please let me know if anyone has come across such issue or any useful notes on this.I could not find any related notes on Market place.
Regards,
DinakarHi,
This is happening only with one communication channel which is sender in derection.Any reason why it is happening like this?since the restart of the communication channel it is getting update now.I really do not know how to delete/create the communication channels as this was done our PI consultants.Pls guide me.
Regards,
Dinakar -
Using Request Response Bean Module in FILE Adapter
Hi Experts,
Can we use Request Response Bean Module in FILE Adapter in reverse way. That is can we configure thses adapter modules in Reciever file channel and call a sender file channel in it?
My case is RFC to File synchronous case? How do we do this?
Thanks & Regards,
priyankaCan we use Request Response Bean Module in FILE Adapter in reverse way. That is can we configure thses adapter
modules in Reciever file channel and call a sender file channel in it?
My case is RFC to File synchronous case? How do we do this?
The above is not possible....Bean works only for Sender channel and not for Receiver.....requirement not possible using even a BPM as FILE does not support SYNC communication in receiver end......max you can do is split the scenario into SYNC-ASYNC bridge.
Regards,
Abhishek. -
How to set DEBUG severity for File adapter in J2SE AE
Hi,
Can anyone help me in setting the severity level to DEBUG for file adapter?
I have tried to set in logging.properties file as given below,
formatter[Trace] = TraceFormatter
formatter[Trace].pattern =%24d [%t] %-6s %l - %m
log[Trace] = FileLog
log[Trace].pattern = swb_%g.log
log[Trace].limit = 2000000
log[Trace].cnt = 5
log[Trace].formatter = formatter[Trace]
com.sap.aii.messaging.adapter.severity = DEBUG
logging components
#com.sap.aii.axis.logs = +log[Trace]
#com.sap.aii.axis.severity = DEBUG
#org.apache.axis.logs = +log[Trace]
#org.apache.axis.severity = DEBUG
Please correct me if I have did anything wrong and sugest me hot to set the DEBUG level as soon as possible.
Best Regards,
SooryaHi Sejoon,
when we changed the host of XI server in one of our projects one of the things we had to change was the exchange profile entries
http://server:port/exchangeProfile/index.html
to see how your adapter engine is configured
http://server:port/sld
SLD -> Content Maintenance
then
Subset: landscape description
Class: XI Adapter Framework
buth check the exchange profile entries first
Regards,
michal -
Dynamic UserID/Password for file Adapter
Hi,
How to use dynamic UserId/Password for file adapter ?
(Sender/Receiver)
In our case the Id/Pwd of FTP Site changes freguently.
Can anyone help.
Thanks in Advance
Regards
ChemmanzHi Chemmanz,
>>>>In our case the Id/Pwd of FTP Site changes freguently.
but do you have those passwords in the message payload?
if not then you will still have to fill it somewhere right?
BTW
the only way would be to use java proxies and write a simple ftp adapter inside it (or your own adapter)
but this is not possible in standard I believe
Regards,
michal -
How to have Secure Connection for File Adapter.Pls help
Hi All,
For File to File Scenario
How to have Secure Connection for File Adapter.
Pls send links/blogs explaining this scenario.
Regardshi rich
go through these links
FTPs connection failed - error ".. certificate rejected by ChainVerifier"
Re: What is SFTP, FTI channels
http://help.sap.com/saphelp_erp2005/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
FTPS implementation question.
http://help.sap.com/saphelp_nw04s/helpdata/en/43/0e16bfd7b021aee10000000a1553f6/frameset.htm
Server certificate rejected by ChainVerifier:FTPS server(Points Guaranteed)
/people/krishna.moorthyp/blog/2007/07/31/sftp-vs-ftps-in-sap-pi
File adapter
thanks
Kunaal -
Hi,
I'm to create Excel file by C# codes and have got this
Error 1 Assembly 'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' uses 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' which has a higher version than referenced assembly 'office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
Error 2 Assembly 'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' uses 'Microsoft.Vbe.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' which has a higher version than referenced assembly 'Microsoft.Vbe.Interop, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
using these codes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Text.RegularExpressions;
using System.Globalization;
using System.Collections;
using System.Diagnostics;
using System.Drawing;
using Microsoft.Office.Interop;
using Excel = Microsoft.Office.Interop.Excel;
namespace ns1
class Program
static void Main(string[] args)
string orp_path = "//ABC";
bool allowappend = true;
string test = "test";
Excel.Application app = null;
Excel.Workbook workbook = null;
Excel.Worksheet worksheet = null;
Excel.Range workSheet_range = null;
object misValue = System.Reflection.Missing.Value;
Excel.Application xlApp = new
Microsoft.Office.Interop.Excel.Application();
workbook = xlApp.Workbooks.Add(misValue);
workbook = xlApp.Workbooks.Add(misValue);
worksheet = (Excel.Worksheet)workbook.Worksheets.get_Item(1);
worksheet.Cells[1, 1] = "Run Date";
workbook.SaveAs("c:\\" + test + ".xls", Excel.XlFileFormat.xlOpenXMLTemplate, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
workbook.Close(true, misValue, misValue);
xlApp.Quit();
releaseObject(worksheet);
releaseObject(workbook);
releaseObject(xlApp); ...
on VS 2013. Any advice?
Many Thanks & Best Regards, Hua MinHey,
Not sure what the problem is, I got the code working.
One thing you're doing wrong though: Excel.XlFileFormat.xlOpenXMLTemplate supposes you're using the file extension ".xlsx" (Open XML format) and not ".xls" (Microsoft Excel 97-2003).
So you should start by changing either the extension to xlsx or the XlFileFormat to
xlExcel8.
For further reference take a look
here -
Problem of Creating Multiple Communication channels for multiple files
Hi Everybody
I have a very basic doubt but this struck me...
For a file-XI-file scenario,if multiple files are coming from same FTP server but with different names then we have to create multiple communication channels for all the files of different names..but is this a intelligent approach?Can we do something so that only one communication channel can receive multiple files of different names?plz explain in detail if possible ASAP.
I have another doubt as in File-XI-File scenario how the XI understands that a particular file is from this FTP server needs to be send to another particular FTP Server?is it only the name of the file which we give in sender comm channel & receiver comm chaneel which determines this????that means this name should always be same?plz explain in detail if anybody knows?Thanks Aamir.I understood the solution.
Correct me if I am wrong.......
1)If there are multiple files with different names & different extensions in the sender FTP then we use-->
2)if there are multiple files with different names & different extensions in sender FTP & I want only say files of 2 extension types(say .xml & .txt)then we use-->
*.xml
in one comm channel &
*.txt
in another comm channel rite??
Also I wanted to ask that only two kinda files we can pick up through sender comm channel rite?
.xml and .txt(File content Conversion).Can we pick files of other extensions also?(say .doc,.xls)If we use as u said
then files of all other extensions will also be picked up rite?bt hw will xi convert them into xml?plz explain......
One of my other q is not answered yet.........all these same doubts are there for receiver communication channel.......but you all have not said nething abt the receiver comm channel........plz explain the answers to all these queries for receiver comm channel for a receiver FTP........ASAP......thanks once again....... -
Problem in creating a java proxy for PHP web service
This is a problem in generating a java proxy for a PHP webservice.
I have a PHP service running on Wamp Server and also a PHP client which is able to call the service.
The WSDL for the PHP web service is also generated .
I am trying to create a java proxy using the jdev (10.1.3.0.3) from the wsdl file.
The wsdl generated by the php program is
<?xml version="1.0" encoding="ISO-8859-1" ?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd" xmlns:tns="urn:hellowsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:hellowsdl">
<types>
<xsd:schema targetNamespace="urn:hellowsdl">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</xsd:schema>
</types>
<message name="helloRequest">
<part name="name" type="xsd:string" />
</message>
<message name="helloResponse">
<part name="return" type="xsd:string" />
</message>
<portType name="hellowsdlPortType">
<operation name="hello">
<documentation>Says hello to the caller</documentation>
<input message="tns:helloRequest" />
<output message="tns:helloResponse" />
</operation>
</portType>
<binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="hello">
<soap:operation soapAction="urn:hellowsdl#hello" style="rpc" />
<input>
<soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="hellowsdl">
<port name="hellowsdlPort" binding="tns:hellowsdlBinding">
<soap:address location="http://localhost/mywork/myphp.php" />
</port>
</service>
</definitions>After making following changes to the wsdl program, I tried to generate java proxy.
<definitions name="hellowsdl"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd" xmlns:tns="http://localhost/mywork/hellowsdl.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/mywork/myphpwsdl.wsdll">
<types>
<xsd:schema targetNamespace="http://localhost/mywork/hellowsdl.wsdl">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</xsd:schema>
</types>
<message name="helloRequest">
<part name="name" type="xsd:string" />
</message>
<message name="helloResponse">
<part name="return" type="xsd:string" />
</message>
<portType name="hellowsdlPortType">
<operation name="hello">
<documentation>Says hello to the caller</documentation>
<input message="tns:helloRequest" />
<output message="tns:helloResponse" />
</operation>
</portType>
<binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="hello">
<soap:operation soapAction="" style="rpc" />
<input>
<soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="hellowsdl">
<port name="hellowsdlPort" binding="tns:hellowsdlBinding">
<soap:address location="http://localhost/mywork/myphp.php" />
</port>
</service>
</definitions>This is how the java stub file looks like:
public class HellowsdlBinding_Stub
extends oracle.j2ee.ws.client.StubBase
implements demo.mypackage.HellowsdlPortType {
* public constructor
public HellowsdlBinding_Stub(HandlerChain handlerChain) {
super(handlerChain);
_setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://localhost/mywork/hellowsdl.php");
setSoapVersion(SOAPVersion.SOAP_11);
setServiceName( new QName("http://localhost/mywork/hellowsdl","hellowsdl"));
setPortName( new QName("http://localhost/mywork/hellowsdl","hellowsdlPort"));
* implementation of hello
public java.lang.String hello(java.lang.String name)
throws java.rmi.RemoteException {
StreamingSenderState _state = null;
try {
_state = _start(_handlerChain);
if (_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS) != null) {
_state.getMessageContext().getMessage().setProperty("DimeEncode",_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS));
InternalSOAPMessage _request = _state.getRequest();
_request.setOperationCode(hello_OPCODE);
_state.getMessageContext().setProperty("oracle.j2ee.ws.mgmt.interceptor.operation-qname",new QName("","hello"));
demo.mypackage.runtime.HellowsdlBinding_hello_ReqS _myHellowsdlBinding_hello_ReqS = new demo.mypackage.runtime.HellowsdlBinding_hello_ReqS();
_myHellowsdlBinding_hello_ReqS.setName(name);
SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_hello_hello_QNAME);
_bodyBlock.setValue(_myHellowsdlBinding_hello_ReqS);
_bodyBlock.setSerializer(myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer);
_request.setBody(_bodyBlock);
_state.getMessageContext().setProperty("http.soap.action", "http://localhost/mywork/hellowsdl");
_send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
demo.mypackage.runtime.HellowsdlBinding_hello_RespS _myHellowsdlBinding_hello_RespS = null;
Object _responseObj = _state.getResponse().getBody().getValue();
if (_responseObj instanceof SOAPDeserializationState) {
_myHellowsdlBinding_hello_RespS =
(demo.mypackage.runtime.HellowsdlBinding_hello_RespS)((SOAPDeserializationState)_responseObj).getInstance();
} else {
_myHellowsdlBinding_hello_RespS =
(demo.mypackage.runtime.HellowsdlBinding_hello_RespS)_responseObj;
return _myHellowsdlBinding_hello_RespS.get_return();
} catch (RemoteException e) {
// let this one through unchanged
throw e;
} catch (JAXRPCException e) {
throw new RemoteException(e.getMessage(), e);
} catch (Exception e) {
if (e instanceof RuntimeException) {
throw (RuntimeException)e;
} else {
throw new RemoteException(e.getMessage(), e);
* this method deserializes the request/response structure in the body
protected void _readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
int opcode = state.getRequest().getOperationCode();
switch (opcode) {
case hello_OPCODE:
_deserialize_hello(bodyReader, deserializationContext, state);
break;
default:
throw new SenderException("sender.response.unrecognizedOperation", Integer.toString(opcode));
* This method deserializes the body of the hello operation.
private void _deserialize_hello(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
try {
Object myHellowsdlBinding_hello_RespSObj =
myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer.deserialize(ns1_hello_helloResponse_QNAME,
bodyReader, deserializationContext);
SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_hello_helloResponse_QNAME);
bodyBlock.setValue(myHellowsdlBinding_hello_RespSObj);
state.getResponse().setBody(bodyBlock);
} catch (DeserializationException e) {
if (e.getSoapFaultSubCodeType() == JAXRPCExceptionBase.FAULT_CODE_NONE && e.getSoapFaultCodeType() != JAXRPCExceptionBase.FAULT_CODE_DATA_ENCODING_UNKNOWN) {
e.setSoapFaultSubCodeType(JAXRPCExceptionBase.FAULT_CODE_BAD_ARGUMENTS);
throw e;
public String _getEncodingStyle() {
return SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding();
public void _setEncodingStyle(String encodingStyle) {
throw new UnsupportedOperationException("cannot set encoding style");
public ClientTransport getClientTransport() {
return super._getTransport();
* This method returns an array containing (prefix, nsURI) pairs.
protected String[] _getNamespaceDeclarations() {
return myNamespace_declarations;
* This method returns an array containing the names of the headers we understand.
public QName[] _getUnderstoodHeaders() {
return understoodHeaderNames;
* This method handles the case of an empty SOAP body.
protected void _handleEmptyBody(XMLReader reader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
public void _initialize(InternalTypeMappingRegistry registry) throws Exception {
super._initialize(registry);
myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_ReqS.class, ns1_hello_TYPE_QNAME);
myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_RespS.class, ns1_helloResponse_TYPE_QNAME);
private static final QName _portName = new QName("http://localhost/mywork/hellowsdl", "hellowsdlPort");
private static final int hello_OPCODE = 0;
private static final QName ns1_hello_hello_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
private static final QName ns1_hello_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
private CombinedSerializer myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer;
private static final QName ns1_hello_helloResponse_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
private static final QName ns1_helloResponse_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
private CombinedSerializer myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer;
private static final String[] myNamespace_declarations =
new String[] {
"ns0", "http://localhost/mywork/hellowsdl"
private static final QName[] understoodHeaderNames = new QName[] { };
}The errors that are produced are-
java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found
Kindly help to resolve this.
Thanks.This is a problem in generating a java proxy for a PHP webservice.
I have a PHP service running on Wamp Server and also a PHP client which is able to call the service.
The WSDL for the PHP web service is also generated .
I am trying to create a java proxy using the jdev (10.1.3.0.3) from the wsdl file.
The wsdl generated by the php program is
<?xml version="1.0" encoding="ISO-8859-1" ?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd" xmlns:tns="urn:hellowsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:hellowsdl">
<types>
<xsd:schema targetNamespace="urn:hellowsdl">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</xsd:schema>
</types>
<message name="helloRequest">
<part name="name" type="xsd:string" />
</message>
<message name="helloResponse">
<part name="return" type="xsd:string" />
</message>
<portType name="hellowsdlPortType">
<operation name="hello">
<documentation>Says hello to the caller</documentation>
<input message="tns:helloRequest" />
<output message="tns:helloResponse" />
</operation>
</portType>
<binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="hello">
<soap:operation soapAction="urn:hellowsdl#hello" style="rpc" />
<input>
<soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="hellowsdl">
<port name="hellowsdlPort" binding="tns:hellowsdlBinding">
<soap:address location="http://localhost/mywork/myphp.php" />
</port>
</service>
</definitions>After making following changes to the wsdl program, I tried to generate java proxy.
<definitions name="hellowsdl"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:si="http://soapinterop.org/xsd" xmlns:tns="http://localhost/mywork/hellowsdl.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/mywork/myphpwsdl.wsdll">
<types>
<xsd:schema targetNamespace="http://localhost/mywork/hellowsdl.wsdl">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
</xsd:schema>
</types>
<message name="helloRequest">
<part name="name" type="xsd:string" />
</message>
<message name="helloResponse">
<part name="return" type="xsd:string" />
</message>
<portType name="hellowsdlPortType">
<operation name="hello">
<documentation>Says hello to the caller</documentation>
<input message="tns:helloRequest" />
<output message="tns:helloResponse" />
</operation>
</portType>
<binding name="hellowsdlBinding" type="tns:hellowsdlPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="hello">
<soap:operation soapAction="" style="rpc" />
<input>
<soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="http://localhost/mywork/hellowsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="hellowsdl">
<port name="hellowsdlPort" binding="tns:hellowsdlBinding">
<soap:address location="http://localhost/mywork/myphp.php" />
</port>
</service>
</definitions>This is how the java stub file looks like:
public class HellowsdlBinding_Stub
extends oracle.j2ee.ws.client.StubBase
implements demo.mypackage.HellowsdlPortType {
* public constructor
public HellowsdlBinding_Stub(HandlerChain handlerChain) {
super(handlerChain);
_setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://localhost/mywork/hellowsdl.php");
setSoapVersion(SOAPVersion.SOAP_11);
setServiceName( new QName("http://localhost/mywork/hellowsdl","hellowsdl"));
setPortName( new QName("http://localhost/mywork/hellowsdl","hellowsdlPort"));
* implementation of hello
public java.lang.String hello(java.lang.String name)
throws java.rmi.RemoteException {
StreamingSenderState _state = null;
try {
_state = _start(_handlerChain);
if (_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS) != null) {
_state.getMessageContext().getMessage().setProperty("DimeEncode",_getProperty(ClientConstants.DIME_ENCODE_MESSAGES_WITH_ATTACHMENTS));
InternalSOAPMessage _request = _state.getRequest();
_request.setOperationCode(hello_OPCODE);
_state.getMessageContext().setProperty("oracle.j2ee.ws.mgmt.interceptor.operation-qname",new QName("","hello"));
demo.mypackage.runtime.HellowsdlBinding_hello_ReqS _myHellowsdlBinding_hello_ReqS = new demo.mypackage.runtime.HellowsdlBinding_hello_ReqS();
_myHellowsdlBinding_hello_ReqS.setName(name);
SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_hello_hello_QNAME);
_bodyBlock.setValue(_myHellowsdlBinding_hello_ReqS);
_bodyBlock.setSerializer(myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer);
_request.setBody(_bodyBlock);
_state.getMessageContext().setProperty("http.soap.action", "http://localhost/mywork/hellowsdl");
_send((String) _getProperty(ENDPOINT_ADDRESS_PROPERTY), _state);
demo.mypackage.runtime.HellowsdlBinding_hello_RespS _myHellowsdlBinding_hello_RespS = null;
Object _responseObj = _state.getResponse().getBody().getValue();
if (_responseObj instanceof SOAPDeserializationState) {
_myHellowsdlBinding_hello_RespS =
(demo.mypackage.runtime.HellowsdlBinding_hello_RespS)((SOAPDeserializationState)_responseObj).getInstance();
} else {
_myHellowsdlBinding_hello_RespS =
(demo.mypackage.runtime.HellowsdlBinding_hello_RespS)_responseObj;
return _myHellowsdlBinding_hello_RespS.get_return();
} catch (RemoteException e) {
// let this one through unchanged
throw e;
} catch (JAXRPCException e) {
throw new RemoteException(e.getMessage(), e);
} catch (Exception e) {
if (e instanceof RuntimeException) {
throw (RuntimeException)e;
} else {
throw new RemoteException(e.getMessage(), e);
* this method deserializes the request/response structure in the body
protected void _readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
int opcode = state.getRequest().getOperationCode();
switch (opcode) {
case hello_OPCODE:
_deserialize_hello(bodyReader, deserializationContext, state);
break;
default:
throw new SenderException("sender.response.unrecognizedOperation", Integer.toString(opcode));
* This method deserializes the body of the hello operation.
private void _deserialize_hello(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
try {
Object myHellowsdlBinding_hello_RespSObj =
myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer.deserialize(ns1_hello_helloResponse_QNAME,
bodyReader, deserializationContext);
SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_hello_helloResponse_QNAME);
bodyBlock.setValue(myHellowsdlBinding_hello_RespSObj);
state.getResponse().setBody(bodyBlock);
} catch (DeserializationException e) {
if (e.getSoapFaultSubCodeType() == JAXRPCExceptionBase.FAULT_CODE_NONE && e.getSoapFaultCodeType() != JAXRPCExceptionBase.FAULT_CODE_DATA_ENCODING_UNKNOWN) {
e.setSoapFaultSubCodeType(JAXRPCExceptionBase.FAULT_CODE_BAD_ARGUMENTS);
throw e;
public String _getEncodingStyle() {
return SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding();
public void _setEncodingStyle(String encodingStyle) {
throw new UnsupportedOperationException("cannot set encoding style");
public ClientTransport getClientTransport() {
return super._getTransport();
* This method returns an array containing (prefix, nsURI) pairs.
protected String[] _getNamespaceDeclarations() {
return myNamespace_declarations;
* This method returns an array containing the names of the headers we understand.
public QName[] _getUnderstoodHeaders() {
return understoodHeaderNames;
* This method handles the case of an empty SOAP body.
protected void _handleEmptyBody(XMLReader reader, SOAPDeserializationContext deserializationContext, StreamingSenderState state) throws Exception {
public void _initialize(InternalTypeMappingRegistry registry) throws Exception {
super._initialize(registry);
myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_ReqS.class, ns1_hello_TYPE_QNAME);
myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer = (CombinedSerializer)registry.getSerializer(SOAPEncodingConstants.getSOAPEncodingConstants(soapVersion).getURIEncoding(), demo.mypackage.runtime.HellowsdlBinding_hello_RespS.class, ns1_helloResponse_TYPE_QNAME);
private static final QName _portName = new QName("http://localhost/mywork/hellowsdl", "hellowsdlPort");
private static final int hello_OPCODE = 0;
private static final QName ns1_hello_hello_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
private static final QName ns1_hello_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "hello");
private CombinedSerializer myns1_hello__HellowsdlBinding_hello_ReqS_SOAPSerializer;
private static final QName ns1_hello_helloResponse_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
private static final QName ns1_helloResponse_TYPE_QNAME = new QName("http://localhost/mywork/hellowsdl", "helloResponse");
private CombinedSerializer myns1_helloResponse__HellowsdlBinding_hello_RespS_SOAPSerializer;
private static final String[] myNamespace_declarations =
new String[] {
"ns0", "http://localhost/mywork/hellowsdl"
private static final QName[] understoodHeaderNames = new QName[] { };
}The errors that are produced are-
java.rmi.RemoteException: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 404 Not Found
Kindly help to resolve this.
Thanks. -
Problem in creating a build.xml for weblogic portal application
Team ,
I am facing problem in creating the build.xml using weblogic.BuildXMLGEN tool .
a) Below is the structure of my portal application
SrcCode
--- .metadata (eclipse plugins folder)
--- B2BApp ( Ear Content)
--- b2bPortal ( portal related file(controllers,jsp)
--- b2bsrc (java src)
b) Now I executed below utility to generate the build.xml "
java weblogic.BuildXMLGen -projectName B2BApp -username weblogic -file build.xml -password welcome1 F:\srcCode"
c) Based on the above step , build.xml got generated .
d) when I execute "ant compile" target from the command prompt , I see the below exception
ant compile
Buildfile: build.xml
compile:
+[wlcompile] [JAM] Warning: failed to resolve class AbstractJspBacking+
+[wlcompile] [JAM] Error: unexpected exception thrown:+
+[wlcompile] com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in F:\b2bNew\b2bPortal\src\portlets\b2b\dmr\Picker\PickerController.java at line 58.+
e) I suspect , the problem is bcoz of classpath issues , as I generated build.xml donot have the references to dependent lib's.As build.xml looks like below :
+<target name="compile" description="Only compiles B2BApp application, no appc">+
+<wlcompile srcdir="${src.dir}" destdir="${dest.dir}">+
+<!-- These referenced libraries were not found -->+
+<!-- <library file="p13n-core-web-lib" /> -->+
+<!-- <library file="jersey-web-lib" /> -->+
+.....+
+....+
Please help me to reslove these issues .
PS: I able to deploy the application using 10.3.2 weblogic workshop ( i.e inbuilt eclipse )i JaySen ,
thanks for your response. As mentioned we added all the necessary library within the -librarydir but still we see the same error :
+[JAM] Error: unexpected exception thrown:+
com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in F:\b2bNew\b2bPortal\src\portlets\typeAhead\TypeAheadController.java at line 70. Most likely, an annotation is declared whose type has not been imported.
at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.getAnnotationTypeFor(JavadocTigerDelegateImpl_150.java:410)
at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.extractAnnotations(JavadocTigerDelegateImpl_150.java:176)
at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.extractAnnotations(JavadocTigerDelegateImpl_150.java:152)
at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.addAnnotations(JavadocClassBuilder.java:404)
at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.populate(JavadocClassBuilder.java:359)
===================
a) this is a upgrade project [ upgrading from wlp 8.1.4 to 10.3.2 ]
i.e we are using weblogic portal 10.3.2 version.
b) Searched some sites/forums regarding the above error, and it says something related to "jwsc" ant task [ i.e while compiling a webservice(JWS) ], but we see this error while compiling a normal controller(jpf) class :(
c) we are using "ant compile" target which internally calls wlcompile task , while executing wlcompile this error is thrown .
Help Appreciated
Thx,
Sarat
Maybe you are looking for
-
How to Hide Row in table view depend on condition
Dear Friends, Please any one suggest how to do hide some rows in table depend on condtions. My Issue is : I have table with binding componant context controller, with in that some rows are no need to disply in my table, I tried to delete that entitie
-
Automatic PO creation from Imported Approved Requisition
Hi, Is there any setup to allow automatic PO creation from Imported Approved Requisition. 1. Run Requisition Import to import approved Requisition with no workflow fired. 2. Can we kick off automatic PO creation workflow without kicking off Requisiti
-
Creating a file in network drive and WEB server.
Hi I tried to create and place a text file in network drive(a folder in a system other that MII server which is neither FTP nor a webserver) it did not work.while running the transaction using write file action block it throws an error (Authentic
-
1. Firefox Help 2. Search Refine your search Found 0 results for I have a lot of firefox downloads BUT can't find anything to click to see them - Where is the button that will show all Firefox downloads? in English in English
-
Problem : Recording video & audio from webcam
Hi all I want to record myself to see the expression on my face on average through the USB webcam . I use mencoder for recording from USB webcam . mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc