Uniqueness Constraint Violation When Generating Web Service Proxy
JDeveloper 10.1.3.2 & 10.1.3.3
I'm receiving an error message that a class has already been gerated when attempting to use JDeveloper to create the stubs for a web service from the wsdl & xsd's. The problem seems to center on the declaration for the faults in one xsd file:
=========================
<!--Faults-->
<xs:element name="userLookupFault" type="tns:testFaultType"/>
<xs:element name="testFault" type="tns:testFaultType">
<xs:annotation>
<xs:documentation>testFault should be the 'default' fault type for faults that are not categorized
into more specific faults.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="testFaultType">
<xs:sequence>
<xs:element name="message" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="timestamp" type="xs:dateTime" nillable="false" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
=========================
Apparently because the userLookupFault and testFault elements are both of type testFaultType JDeveloper attempts to create the testFaultType class twice. I've been able to get the proxy files to generate if I change one of the elements to a different type:
=========================
<xs:element name="userLookupFault" type="tns:userLookupFaultType"/>
<xs:complexType name="userLookupFaultType">
<xs:sequence>
<xs:element name="message" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="timestamp" type="xs:dateTime" nillable="false" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:element name="testFault" type="tns:testFaultType" />
<xs:complexType name="testFaultType">
<xs:sequence>
<xs:element name="message" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1"/>
<xs:element name="timestamp" type="xs:dateTime" nillable="false" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
=========================
Upon review I see that the wsdl files that fail to generate attempt to use both userLookupFault and testFault but those that use only one generate successfully.
Has anyone else experienced this issue?
Is there a reason two faults cannot be of the same type?
WSDLs were supplied by third party managing the web service I am attempting to generate the proxies for. I'm unsure of the method used to create the WSDL files.
Similar Messages
-
Error when generating Web Services Proxy for SCA Application Module
Hello,
I'm trying to create Web Services for a simple Application Module with JDeveloper 11g (11.1.1.3.0).
I start a new ADF Project, I create an Application Module as simple as possible : it contains only a simple View Object on the DEPT Entity.
On my Application Module, I choose "Service Interface" and I add my View Object in the service interface.
I test my Web Service in the Embedded Weblogic Server, it works well. (I succeed in using the Get operation, for example).
But when I try to generate a Web Service proxy (right-click on the WSDL File -> Generate Web Service Proxy), It always fail with such errors :
oracle.jdeveloper.webservices.tools.WsdlValidationException: Error creating model from wsdl "file:/C:/JDeveloper/mywork/ApplicationAppelServiceSCA/Model/src/model/common/AppModuleService.wsdl": 'unset' is already defined'Bytes' is already defined'ref' is already defined'Duration' is already defined'Types' is already defined'Character' is already defined'type' is already defined'Day' is already defined'nestedInterfaces' is already defined'Date' is already defined'datagraph' is already defined'Type' is already defined'Integer' is already defined'ModelsType' is already defined'ChangeSummaryType' is already defined'instanceClass' is already defined'Month' is already defined'DataObject' is already defined'javaClass' is already defined'LongObject' is already defined'DateTime' is already defined'dataObject' is already defined'YearMonth' is already defined'ShortObject' is already defined'Long' is already defined'types' is already defined'JavaInfo' is already defined'IntObject' is already defined'Boolean' is already defined'DoubleObject' is already defi...
Can someone help me to understand this error ?
i never manually edited the WSDL File, so I don't understand why the generated WSDL or XSD files might contain errors.
Thanks for your Help,
LaurentWe have the same problem, and the problem was in the xsd import:
The wdsl import a schema that import other schema, the second import use a relative path, that was wrong.
So check the xsd import sequence.... -
Is it possible to rename a property when generate web service proxy?
We have issue to generate client proxy because of following schema:
<xs:complexType name="Provider">
<xs:sequence>
<xs:element minOccurs="0" name="SSN" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Ssn" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
This is from our vendor's wsdl file. Two "ssn" with different case are intentionally kept for backward compatibility. Is there a way to get around the issue? Here is the error message:
Caused by: java.lang.IllegalArgumentException: trying to create the same field twice: ssn
at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:419)
at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:390)
at com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:72)
at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:89)
at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:76)
at sun.reflect.GeneratedConstructorAccessor175.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.tools.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:64)
at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:79)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:754)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:542)
at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:242)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:182)
at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:252)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:134)
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2255)
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:194)
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:140)
at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:261)
at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool.buildWsdlModel(JDevWsimportTool.java:381)
at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool.buildWsdlModel(JDevWsimportTool.java:344)
at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool.access$000(JDevWsimportTool.java:91)
at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool$1.derrive(JDevWsimportTool.java:161)
at oracle.jdevimpl.webservices.tools.weblogic.JDevWsimportTool$1.derrive(JDevWsimportTool.java:157)
at oracle.javatools.util.deferred.DerivedCache$CachedResource.get(DerivedCache.java:144)I tried to add a binding file to change one of the ssn to ssn1. Now The error message changed to "[ERROR] Two declarations cause a collision in the ObjectFactory class." We noticed if we generate the client proxy with default setting. It works fine (for other web services). Once we start to customize the generated code by changing package name or in this particular case change property name, Jdeveloper starts to complain the name collision. Does anyone know how to solve this? We prefer not to rename those names since there are too many name collisions. Besides the generated code will deviate from document too much if we try to rename those names with conflict.
-
OER: Generate Web Service Proxy REX in JDeveloper
Hi,
I want to generate a Web Service Proxy for REX (OER version 11.1.1.5.0) using JDeveloper 11.1.1.5.0. I am using JAX-RPC Weblogic Style. When I start the Web Service Proxy Generator it fails with the following error:
"The WSDL document contains the following errors:
Operation "assetTypeTabsRead" and "assetTabApprove" have conflicting SOAPAction avlues. Do not overload any operation or given unique SOAPAction value to each operation binding.
And many more (42481) ...."
I am looking for the correct way to generate a Service Proxy foor REX and JDeveloper. Any help is appreciated.
Best regards,
Sjoerd
Edited by: Sjoerd Aalbers on Dec 11, 2011 2:18 PM'Generate Web Service Stub/Skeleton' option in 10.1.2, was replaced by 'Generate Web Service Proxy' in 10.1.3
-
Error when creating Web Service Proxy
Hi',
I am creating a web service proxy to call a web service (OSB) "http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/webservices/ws.html#t5", I am making a client to call a OSB proxy and I am able to see the WSDL in the IE, however when I try to create a client using Jdev I get below error.
Please advice me.
Thanks
Yatan
oracle.jdeveloper.webservices.model.WebServiceException: Error creating model from wsdl "http://localhost:8001/xx/som/contracts/CustomerContract?wsdl": A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.TaskCompletionMessage" is already in use. Use a class customization to resolve this conflict.(Relevant to above error) another "TaskCompletionMessage" is generated from here.(Relevant to above error) another "SOMMessage" is generated from here.A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.SOMMessage" is already in use. Use a class customization to resolve this conflict.Two declarations cause a collision in the ObjectFactory class.(Related to above error) This is the other declaration.
at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1635)
at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2846)
at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2611)
at oracle.jdeveloper.webservices.model.java.JavaWebService.<init>(JavaWebService.java:509)
at oracle.jdeveloper.webservices.model.java.JavaWebService.<init>(JavaWebService.java:461)
at oracle.jdeveloper.webservices.model.proxy.WebServiceProxy$ProxyJavaWebService.<init>(WebServiceProxy.java:2268)
at oracle.jdeveloper.webservices.model.proxy.WebServiceProxy.updateServiceModel(WebServiceProxy.java:1701)
at oracle.jdeveloper.webservices.model.proxy.WebServiceProxy.setDescription(WebServiceProxy.java:525)
at oracle.jdevimpl.webservices.wizard.jaxrpc.proxy.ProxyJaxWsSpecifyWSDLPanel.setDescription(ProxyJaxWsSpecifyWSDLPanel.java:238)
at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel.buildModel(SpecifyWsdlPanel.java:1109)
at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel$5.run(SpecifyWsdlPanel.java:661)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)
at java.lang.Thread.run(Thread.java:619)
Caused by: oracle.jdeveloper.webservices.tools.WsdlValidationException: Error creating model from wsdl "http://localhost:8001/xx/som/contracts/CustomerContract?wsdl": A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.TaskCompletionMessage" is already in use. Use a class customization to resolve this conflict.(Relevant to above error) another "TaskCompletionMessage" is generated from here.(Relevant to above error) another "SOMMessage" is generated from here.A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.SOMMessage" is already in use. Use a class customization to resolve this conflict.Two declarations cause a collision in the ObjectFactory class.(Related to above error) This is the other declaration.
at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.newWsdlValidationException(WsaAdaptor.java:825)
at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.getSeiInfo(WsaAdaptor.java:515)
at oracle.jdeveloper.webservices.tools.WebServiceTools.getSeiInfo(WebServiceTools.java:523)
at oracle.jdeveloper.webservices.model.java.JavaWebService.getSeiInfo(JavaWebService.java:1741)
at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1496)
... 12 more
Caused by: oracle.j2ee.ws.common.tools.api.ValidationException: Error creating model from wsdl "http://localhost:8001/xx/som/contracts/CustomerContract?wsdl": A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.TaskCompletionMessage" is already in use. Use a class customization to resolve this conflict.(Relevant to above error) another "TaskCompletionMessage" is generated from here.(Relevant to above error) another "SOMMessage" is generated from here.A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.SOMMessage" is already in use. Use a class customization to resolve this conflict.Two declarations cause a collision in the ObjectFactory class.(Related to above error) This is the other declaration.
at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsWsdlToJavaTool.getJAXWSModel(JaxwsWsdlToJavaTool.java:664)
at oracle.j2ee.ws.tools.wsa.WsdlToJavaTool.createJAXWSModel(WsdlToJavaTool.java:475)
at oracle.j2ee.ws.tools.wsa.Util.getJaxWsSeiInfo(Util.java:1357)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.jdevimpl.webservices.tools.wsa.Assembler$2$1.invoke(Assembler.java:218)
at $Proxy50.getJaxWsSeiInfo(Unknown Source)
at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.getSeiInfo(WsaAdaptor.java:505)
... 15 more
Caused by: oracle.j2ee.ws.common.tools.api.ValidationException: A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.TaskCompletionMessage" is already in use. Use a class customization to resolve this conflict.(Relevant to above error) another "TaskCompletionMessage" is generated from here.(Relevant to above error) another "SOMMessage" is generated from here.A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.SOMMessage" is already in use. Use a class customization to resolve this conflict.Two declarations cause a collision in the ObjectFactory class.(Related to above error) This is the other declaration.
at oracle.j2ee.ws.tools.wsa.SchemaTool.genValueTypes(SchemaTool.java:188)
at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsWsdlToJavaTool.getJAXWSModel(JaxwsWsdlToJavaTool.java:647)
... 24 more
Caused by: oracle.j2ee.ws.common.databinding.common.spi.DatabindingException: A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.TaskCompletionMessage" is already in use. Use a class customization to resolve this conflict.(Relevant to above error) another "TaskCompletionMessage" is generated from here.(Relevant to above error) another "SOMMessage" is generated from here.A class/interface with the same name "com.xx.gpsc.som.core.schema.somcommon.v1.SOMMessage" is already in use. Use a class customization to resolve this conflict.Two declarations cause a collision in the ObjectFactory class.(Related to above error) This is the other declaration.
at oracle.j2ee.ws.common.tools.databinding.jaxb20.JAXB20TypeGenerator.generateJavaTypes(JAXB20TypeGenerator.java:120)
at oracle.j2ee.ws.tools.wsa.SchemaTool.genValueTypes(SchemaTool.java:186)
... 25 moreHi Yatan
The error is mostly there may be some Duplicate variable/schema element decalared in the wsdl or the xsd referred in the wsdl. Like in WSDL for any Operations, most of the times, we use input and outputs as complex xsd element. We declare these xsd in the same file or in another file and import that in the .wsdl file. So check or validate your XSD file for any Duplicates.
In JDeveloper itself, I think, you can open XSD or WSDL and validate it from right click menu options like that.
Thanks
Ravi Jegga -
Have problem when generate Web Service from bapi function
Dear all,
Please kindly help me about generating Web Service from BAPI function, It does not success only this attached function.
I have done so many function without any problems.
I found 1 case that I use specific variable to be an import/ export then, it can't create as well.
As for this one, I try so many changes but I can't success it as well.
This is my function on R/3 4.6C, Dot net connector 2.0, Dot net Frame Work 1.1.
FUNCTION Z_BAPI_ATTACHMENT_CREATE.
""Local interface: Type: Remote-enabled module
*" IMPORTING
*" VALUE(P_BOTYPE) LIKE BORIDENT-OBJTYPE
*" VALUE(P_BO_ID) LIKE BORIDENT-OBJKEY
*" VALUE(P_MSGTYP) LIKE SOFM-DOCTP
*" VALUE(P_DOCTY) LIKE BORIDENT-OBJTYPE
*" VALUE(P_RELTYP) LIKE BRELTYP-RELTYPE
*" VALUE(P_FNAME) LIKE RLGRAP-FILENAME
*" VALUE(P_OBJDES) TYPE SO_OBJ_DES
*" EXPORTING
*" VALUE(RETURNMESSAGE) TYPE CHAR50
INCLUDE : <cntn01>.
P_BOTYPE TYPE BORIDENT-OBJTYPE DEFAULT 'BUS2105'
P_BO_ID TYPE BORIDENT-OBJKEY
P_MSGTYPE TYPE SOFM-DOCTP DEFAULT 'URL'
P_DOCTY TYPE BORIDENT-OBJTYPE DEFAULT 'MESSAGE'
P_RELTYP TYPE BRELTYP-RELTYPE DEFAULT 'ATTA'
P_FNAME TYPE RLGRAP-FILENAME
P_OBJDES TYPE SO_OBJ_DES
TYPES: BEGIN OF ty_message_key,
foltp TYPE so_fol_tp,
folyr TYPE so_fol_yr,
folno TYPE so_fol_no,
doctp TYPE so_doc_tp,
docyr TYPE so_doc_yr,
docno TYPE so_doc_no,
fortp TYPE so_for_tp,
foryr TYPE so_for_yr,
forno TYPE so_for_no,
END OF ty_message_key.
DATA : lv_message_key TYPE ty_message_key.
DATA : lo_message TYPE swc_object.
DATA : lt_doc_content TYPE STANDARD TABLE OF soli-line
WITH HEADER LINE.
First derive the Attachment's ( MESSAGE )document type.
p_docty = 'MESSAGE'.
CASE p_reltyp.
In case of URls
WHEN 'URL'.
p_msgtyp = 'URL'.
In case of Notes / Private Notes
WHEN 'NOTE' OR 'PNOT'.
p_msgtyp = 'RAW'.
WHEN 'ATTA'.
Take given parameter e.g. 'DOC', 'PDF' etc.
P_MSGTYP = 'EXT'.
WHEN OTHERS.
....exit
EXIT.
ENDCASE.
Create an initial instance of BO 'MESSAGE' - to call the
instance-independent method 'Create'.
swc_create_object lo_message 'MESSAGE' lv_message_key.
define container to pass the parameter values to the method call
in next step.
swc_container lt_message_container.
Populate container with parameters for method
swc_set_element lt_message_container 'DOCUMENTTITLE' p_objdes.
swc_set_element lt_message_container 'DOCUMENTLANGU' 'E'.
swc_set_element lt_message_container 'NO_DIALOG' 'X'.
swc_set_element lt_message_container 'DOCUMENTNAME' p_docty.
swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
In case of URLs..it should be concatenated with &KEY& in the begining.
CASE p_msgtyp.
WHEN 'URL'.
lt_doc_content = '&KEY&http://www.rmtiwari.com' .
CONCATENATE '&KEY&' p_fname INTO lt_doc_content.
APPEND lt_doc_content.
In case of Notes or Private Notes, get the data from files on appl
server or from wherever(? - remember background).
WHEN 'RAW'.
lt_doc_content = p_fname.
APPEND lt_doc_content.
In case of PC File attachments
WHEN OTHERS.
OPEN DATASET p_fname FOR INPUT IN BINARY MODE.
IF sy-subrc EQ 0.
DO.
READ DATASET p_fname INTO lt_doc_content. "2 of 27
IF sy-subrc EQ 0.
APPEND lt_doc_content.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET p_fname.
ENDIF.
ENDCASE.
'DocumentContent' is a multi-line element ( itab ).
swc_set_table lt_message_container 'DocumentContent' lt_doc_content.
Size is required in case of File attachments
DATA : lv_doc_size TYPE i.
DATA : l_file_lines TYPE i.
DESCRIBE TABLE lt_doc_content LINES l_file_lines.
READ TABLE lt_doc_content INDEX l_file_lines.
lv_doc_size = ( 255 * ( l_file_lines - 1 ) ) +
STRLEN( lt_doc_content ).
swc_set_element lt_message_container 'DOCUMENTSIZE' lv_doc_size .
Refresh to get the reference of create 'MESSAGE' object for attachment
swc_refresh_object lo_message.
swc_call_method lo_message 'CREATE' lt_message_container.
Get Key of new object
swc_get_object_key lo_message lv_message_key.
Now we have attachment as a business object instance. We can now
attach it to our main business object instance.
Create main BO object_a
data: LO_IS_OBJECT_A type SIBFLPORB. "type SIBFLPORB is unknown, so I
DATA: lo_is_object_a TYPE borident.
lo_is_object_a-objkey = p_bo_id.
lo_is_object_a-objtype = p_botype.
LO_IS_OBJECT_A-CATID = 'BO'.
Create attachment BO object_b
data: LO_IS_OBJECT_B type SIBFLPORB. "type SIBFLPORB is unknown
DATA: lo_is_object_b TYPE borident.
lo_is_object_b-objkey = lv_message_key.
lo_is_object_b-objtype = p_docty.
LO_IS_OBJECT_B-CATID = 'BO'.
*TRY.
*CALL METHOD CL_BINARY_RELATION=>CREATE_LINK
EXPORTING
IS_OBJECT_A = LO_IS_OBJECT_A
IS_OBJECT_B = LO_IS_OBJECT_B
IP_RELTYPE = P_RELTYP.
CALL FUNCTION 'BINARY_RELATION_CREATE'
EXPORTING
obj_rolea = lo_is_object_a
obj_roleb = lo_is_object_b
relationtype = p_reltyp
EXCEPTIONS
OTHERS = 1.
Check if everything OK...who cares!!
COMMIT WORK.
if sy-subrc = 0.
RETURNMESSAGE = 'S-Success'.
else.
RETURNMESSAGE = 'E-Error'.
endif.
ENDFUNCTION.
Thanks in advance,
Benjawan
Edited by: Nitipat Chadchavalpanichaya on Oct 20, 2008 9:02 AMThere is no any error message show up. It just the class
Z_BAPI_ATTACHMENT_CREATE doesn't create autometically as normal. I showed you as below.
That means I can't call class z_bapi_attachment_create.
' <autogenerated>
' This code was generated by a SAP. NET Connector Proxy Generator Version 2.0
' Created at 21/10/2551
' Created from Windows
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </autogenerated>
Imports System
Imports System.Text
Imports System.Collections
Imports System.ComponentModel
Imports System.Runtime.InteropServices
Imports System.Xml.Serialization
Imports System.Web.Services
Imports System.Web.Services.Description
Imports System.Web.Services.Protocols
Imports SAP.Connector
'@ <summary>
'@ Client SAP proxy class
'@ </summary>
<WebServiceBinding(Name:="dummy.Binding", Namespace:="urn:sap-com:document:sap:rfc:functions")> _
Public Class PRAttachment
Inherits SAPClient
'@ <summary>
'@ Initializes a new PRAttachment.
'@ </summary>
Public Sub New()
End Sub
'@ <summary>
'@ Initializes a new PRAttachment with a new connection based on the specified connection string.
'@ </summary>
'@ <param name="connectionString">A connection string (e.g. RFC or URL) specifying the system where the proxy should connect to.</param>
Public Sub New(ByVal ConnectionString As String)
MyBase.New(ConnectionString)
End Sub
'@ <summary>
'@ Initializes a new PRAttachment and adds it to the given container.
'@ This allows automated connection mananged by VS component designer:
'@ If container is disposed, it will also dispose this SAPClient instance,
'@ which will dispose a contained connection if needed.
'@ </summary>
'@ <param name="Cont">The container where the new SAPClient instance is to be added.</param>
Public Sub New(ByVal Cont As Container)
MyBase.New(Cont)
End Sub
End Class -
Error when running Web Service Proxy from JDev (running publisher report)
Hello.
I would like to call publisher report from forms, so i was using this instructions:
http://www.oracle.com/technology/products/xml-publisher/docs/Forms_BIP_v21.pdf
When i test my Web Service Proxy, i get this warning:
WARNING: The received SOAP fault contains non standard fault element: "{http://xml.apache.org/axis/}hostname". This element will be ignored.
javax.xml.rpc.soap.SOAPFaultException: oracle.apps.xdo.webservice.exception.OperationFailedException: PublicReportService::generateReport failed: due to oracle.apps.xdo.servlet.CreateException: Report definition not found:/Path/Employees.xdo
at oracle.j2ee.ws.client.StreamingSender._raiseFault(StreamingSender.java:555)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:396)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
at bip_webservice.proxy.runtime.PublicReportServiceSoapBinding_Stub.runReport(PublicReportServiceSoapBinding_Stub.java:290)
at bip_webservice.proxy.PublicReportServiceClient.runReport(PublicReportServiceClient.java:105)
at bip_webservice.proxy.PublicReportServiceClient.main(PublicReportServiceClient.java:79)
What is wrong? Did anyone try those instructions?
Thanks.I am getting the same error. What was the solution that worked for you? Please help
-
Validation Failed when creating Web Service Proxy
Hi
I am having trouble creating a web service proxy in JDeveloper (11.1.1.3). When I enter the endpoint URL (which is a https WSDL file). I get the following error:
No WSDL document could be found at https://host:port/.../.././...wsdl.
I can open the WSDL in SOAP UI and it accesses it fine and I can call the service within.
When I put it in a browser I need to enter the authentication details before I can view the WSDL.
But I can't get to the next step in the Web Service Proxy wizard, I've had a look in the threads before an couldn't find any help.
Is there anyone who can help me with this?
Regards
SaheemThanks John but unfortunatly that didn't help.
I removed the proxy but the WSDL was still not found I also added the host to the Proxy exceptions list and switched the proxy back on but this did not work either.
I also tried the method in the link you provided. But I get an error when attempting to create a Web Service Dasta Control too. The error I get here is:
DCA-40002: The WSDL document is invalid due to the following reason: WSDl Exception: faultCode=PARSER_ERROR: Failed to read wsdl file at: "https://../../..wsdl", caused by javax.net.ssl.SSLHandshakeException. :........... -
Programatically detecting uniqueness constraint violations when using Direct Path API
I'm developing an application that bulk loads data into the
database using the DirectPath API.
According to the DirectPath API documentation uniqueness
constraints must be disabled prior to importing data using the
DirectPath API, then the constraints must be re-enabled.
If duplicate data is inserted when the constraints are disabled,
enabling the constraints results in the constraint's underlying
index being left in an "unusable" state.
The SQL*Loader tool (which also uses the DirectPath API) somehow
manages to deal with this.
It can successfully detect which data causes the constraint
violation, and politely writes the offending data to a bad rows
file.
If SQL*Loader also uses the DirectPath API - how does it detect
which data causes a constraint violation.
The mere fact that SQL*Loader can do this in DirectPath mode,
shows that it is possible.
Any ideas how to detect which data causes a constraint violation
when using the DirectPath API ?
- AndyI'm developing an application that bulk loads data into the
database using the DirectPath API.
According to the DirectPath API documentation uniqueness
constraints must be disabled prior to importing data using the
DirectPath API, then the constraints must be re-enabled.
If duplicate data is inserted when the constraints are disabled,
enabling the constraints results in the constraint's underlying
index being left in an "unusable" state.
The SQL*Loader tool (which also uses the DirectPath API) somehow
manages to deal with this.
It can successfully detect which data causes the constraint
violation, and politely writes the offending data to a bad rows
file.
If SQL*Loader also uses the DirectPath API - how does it detect
which data causes a constraint violation.
The mere fact that SQL*Loader can do this in DirectPath mode,
shows that it is possible.
Any ideas how to detect which data causes a constraint violation
when using the DirectPath API ?
- Andy -
Error While generating Web Service Proxy using Web Service Action in MII 12
Hi All,
We are using the Web Service action block in BLS transaction to call a web service from an external legacy system. When we provide the WSDL in the action block configuration and click Next we can see the Port and Operation of the web service which we have selected and finally clicked on Finish. On clicking Finish it is giving an error "[Fatal Error] :-1:-1: Premature end of file." and no web service request/response structures are being generated.
The WSDL file is attached herwith. Please check and provide the solution. We are using MII 12.2 SP02 with latest patch.
An error message is also added to the NetWeaver log as below:
XmlProxy Error: Premature end of file.
[EXCEPTION]
org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at com.sap.lhcommon.schema.XmlHelper.loadDocument(XmlHelper.java:38)
at com.sap.lhcommon.schema.XmlHelper.loadDocumentNS(XmlHelper.java:28)
at com.sap.lhcommon.webservice.SoapMessage.getExampleXmlAsBytes(SoapMessage.java:103)
at com.sap.xmii.servlet.XmlProxy.service(XmlProxy.java:204)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:162)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:81)
at com.sap.xmii.system.SecurityFilter.doFilter(SecurityFilter.java:96)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:73)
at com.sap.xsrf.filter.XSRFProtectorFilter.doFilter(XSRFProtectorFilter.java:62)
at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:73)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:468)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:298)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:399)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:388)
at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:84)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:244)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:43)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:428)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:247)
at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:45)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:327)
The wsdl file is as follows:
<wsdl:definitions
targetNamespace="urn:cat.cis.mesassembly.server.service.pod"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://pod.service.server.mesassembly.cis.cat"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:intf="urn:cat.cis.mesassembly.server.service.pod"
xmlns:impl="urn:cat.cis.mesassembly.server.service.pod"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding"
>
<wsdl:types>
<schema targetNamespace="http://pod.service.server.mesassembly.cis.cat"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ProductionOrderDetailsInput">
<sequence>
<element name="detailsString" type="xsd:base64Binary"/>
<element name="productionOrderNumber" nillable ="true" type="xsd:string"/>
<element name="fullExplosionFlag" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ProductionOrderDetailsReceipt">
<sequence>
<element name="errorMessage" nillable="true" type="xsd:string"/>
<element name="valid" type="xsd:boolean"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="processOrderDetailsResponse">
<wsdl:part name="podReturn" type="tns:ProductionOrderDetailsReceipt" />
</wsdl:message>
<wsdl:message name="processOrderDetailsRequest">
<wsdl:part name="input" type="tns:ProductionOrderDetailsInput" />
</wsdl:message>
<wsdl:portType name="PodService">
<wsdl:operation name="ProcessOrderDetails" parameterOrder="input">
<wsdl:input message="impl:processOrderDetailsRequest"
name="processOrderDetailsRequest"/>
<wsdl:output message="impl:processOrderDetailsResponse"
name="processOrderDetailsResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ProdOrderDetailsSoapBinding" type="impl:PodService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ProcessOrderDetails">
<soap:operation soapAction="http://pod.service.server.mesassembly.cis.cat/NewOperation"/>
<wsdl:input name="processOrderDetailsRequest">
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:cat.cis.mesassembly.server.service.pod" />
</wsdl:input>
<wsdl:output name="processOrderDetailsResponse">
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:cat.cis.mesassembly.server.service.pod" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PodService_Service">
<wsdl:port binding="impl:ProdOrderDetailsSoapBinding" name="ProdOrderDetails">
<soap:address location="http:/localhost:8080/MESAssembly/services/ProdOrderDetails"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>The WSDL file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="urn:cat.cis.mesassembly.server.service.pod"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://pod.service.server.mesassembly.cis.cat"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:intf="urn:cat.cis.mesassembly.server.service.pod"
xmlns:impl="urn:cat.cis.mesassembly.server.service.pod"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding"
>
<wsdl:types>
<schema targetNamespace="http://pod.service.server.mesassembly.cis.cat"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ProductionOrderDetailsInput">
<sequence>
<element name="detailsString" type="xsd:base64Binary"/>
<element name="productionOrderNumber" nillable ="true" type="xsd:string"/>
<element name="fullExplosionFlag" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ProductionOrderDetailsReceipt">
<sequence>
<element name="errorMessage" nillable="true" type="xsd:string"/>
<element name="valid" type="xsd:boolean"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="processOrderDetailsResponse">
<wsdl:part name="podReturn" type="tns:ProductionOrderDetailsReceipt" />
</wsdl:message>
<wsdl:message name="processOrderDetailsRequest">
<wsdl:part name="input" type="tns:ProductionOrderDetailsInput" />
</wsdl:message>
<wsdl:portType name="PodService">
<wsdl:operation name="ProcessOrderDetails" parameterOrder="input">
<wsdl:input message="impl:processOrderDetailsRequest"
name="processOrderDetailsRequest"/>
<wsdl:output message="impl:processOrderDetailsResponse"
name="processOrderDetailsResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ProdOrderDetailsSoapBinding" type="impl:PodService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ProcessOrderDetails">
<soap:operation soapAction="http://pod.service.server.mesassembly.cis.cat/NewOperation"/>
<wsdl:input name="processOrderDetailsRequest">
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:cat.cis.mesassembly.server.service.pod" />
</wsdl:input>
<wsdl:output name="processOrderDetailsResponse">
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:cat.cis.mesassembly.server.service.pod" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PodService_Service">
<wsdl:port binding="impl:ProdOrderDetailsSoapBinding" name="ProdOrderDetails">
<soap:address location="http:/localhost:8080/MESAssembly/services/ProdOrderDetails"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions> -
ORA-00001 - unique constraint violation when upgrading 10g EUL
Hi,
I am trying to upgrade my Discoverer 4i to Discoverer 10g.
When I log into 10g, it prompts me to upgrade the EUL. After making the right back up of my 4i EUL, I continue with the upgrade.
During the upgrade, I am hit with this error:
Database error: ORA-00001 unique constraint (EUL_HRMS.EUL5_FOL_UK_1) violated.
I understand that this happens when user tries to insert an already existing value into a column defined as unique. However, I am not sure on how to resolve it.
Can anyone please advice.
Thanks in advance!
Regards,
Harpreet SidhuHi Rod,
I've run the queries and these are the results. Each query returned one row.
1. SELECT FROM EUL_HRMS.EUL5_DOC_FOLDERS*
FOL_ID 100057
FOL_NAME ROOT
FOL_DEVELOPER_KEY ROOT
FOL_DESCRIPTION
FOL_EU_ID 100000
FOL_PARENT_ID
FOL_USER_PROP2
FOL_USER_PROP1
FOL_ELEMENT_STATE 0
FOL_CREATED_BY EUL_HRMS
FOL_CREATED_DATE 19-Jun-09
FOL_UPDATED_BY EUL_HRMS
FOL_UPDATED_DATE 19-Jun-09
NOTM 0
2. SELECT EU_ID, EU_SECURITY_MODEL, EU_USE_PUB_PRIVS, EU_ROLE_FLAG
FROM EUL_HRMS.EUL5_EUL_USERS
WHERE EU_USERNAME = 'PUBLIC'
EU_ID 3000
EU_SECURITY_MODEL 0
EU_USE_PUB_PRIVS 1
EU_ROLE_FLAG 0
Thanks! -
XML Schema mapping error when generating web service
I have created a method in java that returns an array of an object type (a user defined class). When tried to generate a web service JDeveloper did not allow me to select the method, giving the following "Why not.." explanation: "One or more parameters did not have an XML Schema mapping and/or serializer specified".
Can anyone help me in this?
Thanks
AlinaThanks Mike for your advice it did work when I changed the setters and getters names, and managed to create a web service with Apache Soap profile. I created the client stub and client application to run the web service but it keep coming with soap-env error messages.
Error message I get when running the client side:
F:\JDev9i-0-3\jdk\bin\javaw.exe -ojvm -classpath F:\JDev9i-0-3\jdev\mywork\OrbatListArray\OrbatClient\classes;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\soap\lib\soap.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\jlib\javax-ssl-1_2.jar;F:\JDev9i-0-3\jlib\jssl-1_2.jar;F:\JDev9i-0-3\j2ee\home\lib\activation.jar;F:\JDev9i-0-3\j2ee\home\lib\mail.jar;F:\JDev9i-0-3\j2ee\home\lib\http_client.jar orbatclientpackage.OrbatListArrayClient
[SOAPException: faultCode=SOAP-ENV:Server.BadTargetObjectURI; msg=Unable to resolve target object(orbatlistarraypackage.OrbatListArray): orbatlistarraypackage.OrbatListArray [java.lang.ClassNotFoundException]] orbatlistarraypackage.OrbatType[] orbatclientpackage.OrbatListArrayStub.getOrbatListArray() OrbatListArrayStub.java:63 void orbatclientpackage.OrbatListArrayClient.main(java.lang.String[]) OrbatListArrayClient.java:19Exception in thread main
Process exited with exit code 1.
My wsdl file is:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!--Generated by the Oracle9i JDeveloper Web Services WSDL Generator-->
<!--Date Created: Wed Oct 23 11:16:29 BST 2002-->
<definitions
name="OrbatListArray"
targetNamespace="http://orbatlistarraypackage/OrbatListArray.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://orbatlistarraypackage/OrbatListArray.wsdl"
xmlns:ns1="http://orbatlistarraypackage/IOrbatListArray.xsd">
<types>
<schema
targetNamespace="http://orbatlistarraypackage/IOrbatListArray.xsd"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<complexType name="ArrayOfOrbatType" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<complexContent>
<restriction base="SOAP-ENC:Array">
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:orbatlistarraypackage_OrbatType[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="orbatlistarraypackage_OrbatType" jdev:packageName="orbatlistarraypackage" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
<all>
<element name="OrbatName" type="string"/>
<element name="OrbatID" type="int"/>
</all>
</complexType>
</schema>
</types>
<message name="getOrbatListArray0Request"/>
<message name="getOrbatListArray0Response">
<part name="return" type="ns1:ArrayOfOrbatType"/>
</message>
<portType name="OrbatListArrayPortType">
<operation name="getOrbatListArray">
<input name="getOrbatListArray0Request" message="tns:getOrbatListArray0Request"/>
<output name="getOrbatListArray0Response" message="tns:getOrbatListArray0Response"/>
</operation>
</portType>
<binding name="OrbatListArrayBinding" type="tns:OrbatListArrayPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getOrbatListArray">
<soap:operation soapAction="" style="rpc"/>
<input name="getOrbatListArray0Request">
<soap:body use="encoded" namespace="orbatlistarraypackage.OrbatListArray" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output name="getOrbatListArray0Response">
<soap:body use="encoded" namespace="orbatlistarraypackage.OrbatListArray" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="OrbatListArray">
<port name="OrbatListArrayPort" binding="tns:OrbatListArrayBinding">
<soap:address location="http://192.9.200.200:8888/soap/servlet/soaprouter"/>
</port>
</service>
</definitions>
My OrbatListArrayDescriptor.dd file:
<?xml version = '1.0' encoding = 'windows-1252'?>
<!--Generated by the Oracle9i JDeveloper Web Services Deployment Descriptor Generator-->
<!--This Deployment Descriptor file is for use with the Oracle9iAS Release 2 / Apache 2.2 SOAP Server SOAP Server-->
<!--Date Created: Wed Oct 23 11:16:29 BST 2002-->
<isd:service
id="orbatlistarraypackage.OrbatListArray"
xmlns:isd="http://xml.apache.org/xml-soap/deployment">
<isd:provider
type="java"
methods="getOrbatListArray"
scope="Request">
<isd:java class="orbatlistarraypackage.OrbatListArray" static="false"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
My Client Web Service Stub class file:
package orbatclientpackage;
import oracle.soap.transport.http.OracleSOAPHTTPConnection;
import org.apache.soap.encoding.soapenc.BeanSerializer;
import org.apache.soap.encoding.SOAPMappingRegistry;
import org.apache.soap.util.xml.QName;
import java.net.URL;
import org.apache.soap.Constants;
import org.apache.soap.Fault;
import org.apache.soap.SOAPException;
import org.apache.soap.rpc.Call;
import org.apache.soap.rpc.Parameter;
import org.apache.soap.rpc.Response;
import java.util.Vector;
import orbatlistarraypackage.OrbatType;
import java.util.Properties;
* Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
* Date Created: Wed Oct 23 11:19:42 BST 2002
* WSDL URL: file:/F:/JDev9i-0-3/jdev/mywork/OrbatListArray/OrbatListArrayProject/src/orbatlistarraypackage/OrbatListArray.wsdl
public class OrbatListArrayStub
public OrbatListArrayStub()
m_httpConnection = new OracleSOAPHTTPConnection();
m_smr = new SOAPMappingRegistry();
BeanSerializer beanSer = new BeanSerializer();
m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://orbatlistarraypackage/IOrbatListArray.xsd", "orbatlistarraypackage_OrbatType"), orbatlistarraypackage.OrbatType.class, beanSer, beanSer);
public String endpoint = "http://192.9.200.200:8888/soap/servlet/soaprouter";
private OracleSOAPHTTPConnection m_httpConnection = null;
private SOAPMappingRegistry m_smr = null;
public OrbatType[] getOrbatListArray() throws Exception
OrbatType[] returnVal = null;
URL endpointURL = new URL(endpoint);
Call call = new Call();
call.setSOAPTransport(m_httpConnection);
call.setTargetObjectURI("orbatlistarraypackage.OrbatListArray");
call.setMethodName("getOrbatListArray");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
call.setParams(params);
call.setSOAPMappingRegistry(m_smr);
Response response = call.invoke(endpointURL, "");
if (!response.generatedFault())
Parameter result = response.getReturnValue();
returnVal = (OrbatType[])result.getValue();
else
Fault fault = response.getFault();
throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
return returnVal;
public void setMaintainSession(boolean maintainSession)
m_httpConnection.setMaintainSession(maintainSession);
public boolean getMaintainSession()
return m_httpConnection.getMaintainSession();
public void setTransportProperties(Properties props)
m_httpConnection.setProperties(props);
public Properties getTransportProperties()
return m_httpConnection.getProperties();
My Client application main file:
package orbatclientpackage;
import java.io.*;
public class OrbatListArrayClient
public OrbatListArrayClient()
public static void main(String[] args) throws Exception
OrbatListArrayStub s = new OrbatListArrayStub();
// File xmlFile;
// BufferedWriter in;
// xmlFile = new File("f:\\OrbatSoap", "OrbatXMLList.xml");
// PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(xmlFile)));
// out.println(s.getOrbatListArray());
// out.flush();
System.out.println(s.getOrbatListArray());
When I deployed it to jar I copied the jar file in the following directory:
<jdevloper home>\soap\webapps\soap\soap\Web-inf\lib\
I then tried and created a client stub in the same package using JDeveloper 9.0.3 wizard for creating sample java client and added a line to call my getOrbatListArray method and print it to the screen. I get another soap error message, saying:
F:\JDev9i-0-3\jdk\bin\javaw.exe -ojvm -classpath F:\JDev9i-0-3\jdev\mywork\OrbatListArray\OrbatListArrayProject\classes;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\jdbc\lib\classes12.jar;F:\JDev9i-0-3\jdbc\lib\nls_charset12.jar;F:\JDev9i-0-3\rdbms\jlib\xsu12.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\lib\xmlcomp.jar;F:\JDev9i-0-3\jdev\lib\jdev-rt.jar;F:\JDev9i-0-3\soap\lib\soap.jar;F:\JDev9i-0-3\lib\xmlparserv2.jar;F:\JDev9i-0-3\jlib\javax-ssl-1_2.jar;F:\JDev9i-0-3\jlib\jssl-1_2.jar;F:\JDev9i-0-3\j2ee\home\lib\activation.jar;F:\JDev9i-0-3\j2ee\home\lib\mail.jar;F:\JDev9i-0-3\j2ee\home\lib\http_client.jar orbatlistarraypackage.EmbeddedOrbatListArrayStub
[SOAPException: faultCode=SOAP-ENV:IOException; msg=Connection refused: connect; targetException=java.net.ConnectException: Connection refused: connect] void org.apache.soap.SOAPException.<init>(java.lang.String, java.lang.String, java.lang.Throwable) SOAPException.java:77 void oracle.soap.transport.http.OracleSOAPHTTPConnection.send(java.net.URL, java.lang.String, java.util.Hashtable, org.apache.soap.Envelope, org.apache.soap.encoding.SOAPMappingRegistry, org.apache.soap.rpc.SOAPContext) OracleSOAPHTTPConnection.java:765 org.apache.soap.rpc.Response org.apache.soap.rpc.Call.invoke(java.net.URL, java.lang.String) Call.java:253 orbatlistarraypackage.OrbatType1[] orbatlistarraypackage.EmbeddedOrbatListArrayStub.getOrbatListArray() EmbeddedOrbatListArrayStub.java:70 void orbatlistarraypackage.EmbeddedOrbatListArrayStub.main(java.lang.String[]) EmbeddedOrbatListArrayStub.java:38Process exited with exit code 0.
Sorry for the length of this message, but I am getting desparate.
Thanks again for all you help
Alina -
Parameter names change when generating web service from WSDL
Hi,
I have a problem with BEAs web services that I'm hoping someone can help me with.
I have a
WSDL file, and from that I want to generate a web service implementation and a
web service
client. In the WSDL file, I have a message defined like this:
<message name="someRequest">
<part xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:base64Binary"
name="data"/>
</message>
I generate the server using the server using the wsdl2service Ant task, I implement
the necessary classes, and I deploy it. When I access the deployed web service,
the parameter name has changed, from "data" to "bytes". If I access the WSDL file
of the deployed web service, it says:
<message name="someRequest">
<part xmlns:partns="http://www.w3.org/2001/XMLSchema" type="partns:base64Binary"
name="bytes"/>
</message>
This happens for all parameters, string parameters are renamed to "string", base64Binary
parameters are renamed to "bytes", etc...
This poses a problem to me, because if I generate a web service client from the
original WSDL file, it will not be able to talk to my web service. Is there any
way of forcing a web service generated from a WSDL file to keep the parameter
names of the original WSDL file?
Any help in this is greatly appreciated.
Regards,
PetterFrom a quick look of your WSDL, it seams that you are mixing document-literal-bare and document-literal-wrapped flavor of web services. WSA may be able to do a better job at working around this mixed flavors than JDeveloper.
If you have hand crafted this WSDL, I would recomend that you spend some time looking at the way WSDL are generated, with the java-first mode (or bottom-up), then author the WSDL you need for the final service.
Here are sample of bare-style :
<xsd:element name="getPupilAddressResponse" type="xsd:string"/>
<xsd:element name="getPupilAddressRequest" type="xsd:int"/>
Wrapped will looks like that:
<xsd:element name="getSENLevelResponse">
<xsd:complexType>
<xsd:sequence maxOccurs="1" minOccurs="1">
<xsd:element name="LevelDetails" type="tns:SENLevelRecord"/>
<xsd:element name="RecordCount" type="xsd:int">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Hope this helps,
Eric -
Problem when generating web service client using eclipse JavaEE
Hi,
I have created a subservience in SAP .. and the WSDL endpoint is :http://10.130.105.8:8000/sap/bc/srt/wsdl/flv_10002A111AD1/srvc_url/sap/bc/srt/rfc/sap/ztm_ws_get_emp_holidays/520/offici…
But there is problem when I set the service definition. Can you help me, in how to generate the Java classes for SAP web service ?Hi,
Hello again .
Have you tried your service using soapui ?
You can use your WSDL as input .
In order to eliminate eclipse problem try this service:(I just did)
http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL
Regards.
package main;
import java.io.FileInputStream;
import java.rmi.RemoteException;
import java.util.Properties;
import org.oorsprong.www.websamples_countryinfo.CountryInfoServiceSoapType;
import org.oorsprong.www.websamples_countryinfo.CountryInfoServiceSoapTypeProxy;
import org.oorsprong.www.websamples_countryinfo.TCountryCodeAndName;
public class Main {
public static void main(String[] args) {
try {
final Properties properties = new Properties();
properties.load(new FileInputStream("properties.ini"));
System.getProperties().putAll(properties);
} catch (final Exception exception) {
exception.printStackTrace();
new Main();
public Main() {
try {
final CountryInfoServiceSoapType infoServiceSoapType = new CountryInfoServiceSoapTypeProxy();
final TCountryCodeAndName[] tCountryCodeAndNames = infoServiceSoapType.listOfCountryNamesByName();
for (final TCountryCodeAndName tCountryCodeAndName : tCountryCodeAndNames) {
System.out.println(tCountryCodeAndName.getSName());
} catch (final RemoteException exception) {
exception.printStackTrace(); -
Preserve original WSDL when generating Web Service
When generating a Web Service using an existing WSDL, I need to preserve the structure of the original WSDL as much as possible.
The existing WSDL is generated using Apache AXIS. We're hoping to develop a new Web Service using the existing WSDL in JDeveloper, and deploy to OAS. Because of the nature of the client system, the structure of the original WSDL needs to be preserved as much as possible when deploying the new Web Service.
Is this possible using JDeveloper?
-aThanks for the response Yogesh.
I'd seen the top-down approach documentation for JDeveloper, but not the command-line version from OAS. I've been able to successfully develop a top-down service using JDeveloper, the problem is that the resulting WSDL file for the new Web Service is too different in structure from the original. Functionally, I believe they define the same thing. It's a bit contrived, but I'm trying to match the form and function of the original WSDL with the new one generated by a top-down approach.
I'll give the command line tools a try, thanks very much for the link.
Maybe you are looking for
-
I cant download apps, its telling me that i cannot connect to itunes
help!
-
How do I move a file with 'no access' permissions?
I have a file on a computer that I do not have administrator access on. The file's permissions are -r--------, so the system can read the file only and no one else can read or write the file (or execute the file, but it's a text file so that's not re
-
Disabling "Save as" when PDF is online
Hello, I have a PDF form on our server and when clients fill it out I don't want them to be able to file|save the form to their desktop. All I want for them to be able to do is click the "submit by email" button. I looked through the Security Propert
-
I had my nokia 5800 a few weeks now and when i 1st got it i tried to find my bt home hub, it found it but kept losing it again within seconds so i didnt bother at the time, a day later i tried it and it was fine and has been so for the last 2 weeks,
-
Java Drag and Drop from JMenu to JLabel
Hello Fellow Coders, I am working on quite a large project right now. What I am trying to do is the following: 1. When a user clicks on a custom button (extends JLabel) a context Menu opens. (works already) 2. Now the user must be able to drag text f