Highlighted

Web service issue

New Here ,
Jul 04, 2018

Copy link to clipboard

Copied

I have a web web service like "https://test.com/WS/serviceTest.cfc?wsdl" which is calling another cfc file ServiceTest2.cfc.

1. serviceTest.cfc

<cfcomponent  style="document" namespace = "http://DefaultNamespace" output="false">

<cffunction name="GetName" returnType="any" access="remote"> 

<cfargument name="input" type="ServiceTest2[]"> 

<cfdump var="#input#">

</cffunction> 

</cfcomponent>

 

2. ServiceTest2.cfc

<cfcomponent>

<cfproperty name="FirstName" required="No" type="string">

<cfproperty name="LastName" required="No" type="string">

 </cfcomponent>

 

 

Getting the below error:

AXIS error

Sorry, something seems to have gone wrong... here are the details:

 

Fault - Error attempting to create Java skeleton for CFC web service.; nested exception is:   coldfusion.xml.rpc.CFCInvocationException: [java.lang.NoClassDefFoundError : [Lservicetest2;][java.lang.ClassNotFoundException : servicetest2][java.lang.NoClassDefFoundError : servicetest2 (wrong name: ServiceTest2)]
AxisFault  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException  faultSubcode:   faultString: Error attempting to create Java skeleton for CFC web service.; nested exception is:   coldfusion.xml.rpc.CFCInvocationException: [java.lang.NoClassDefFoundError : [Lservicetest2;][java.lang.ClassNotFoundException : servicetest2][java.lang.NoClassDefFoundError : servicetest2 (wrong name: ServiceTest2)]  faultActor:   faultNode:   faultDetail:   {http://xml.apache.org/axis/}hostname:AZR885QASRV01

 

But When I add mapping to web service path then it start working but that add one more namespace  in the WSDl file like

<import namespace="http://abcd123456"/>

 

 

I have imported certificate as well but no luck. 

 

Can you Please help.

Views

292

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Web service issue

New Here ,
Jul 04, 2018

Copy link to clipboard

Copied

I have a web web service like "https://test.com/WS/serviceTest.cfc?wsdl" which is calling another cfc file ServiceTest2.cfc.

1. serviceTest.cfc

<cfcomponent  style="document" namespace = "http://DefaultNamespace" output="false">

<cffunction name="GetName" returnType="any" access="remote"> 

<cfargument name="input" type="ServiceTest2[]"> 

<cfdump var="#input#">

</cffunction> 

</cfcomponent>

 

2. ServiceTest2.cfc

<cfcomponent>

<cfproperty name="FirstName" required="No" type="string">

<cfproperty name="LastName" required="No" type="string">

 </cfcomponent>

 

 

Getting the below error:

AXIS error

Sorry, something seems to have gone wrong... here are the details:

 

Fault - Error attempting to create Java skeleton for CFC web service.; nested exception is:   coldfusion.xml.rpc.CFCInvocationException: [java.lang.NoClassDefFoundError : [Lservicetest2;][java.lang.ClassNotFoundException : servicetest2][java.lang.NoClassDefFoundError : servicetest2 (wrong name: ServiceTest2)]
AxisFault  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException  faultSubcode:   faultString: Error attempting to create Java skeleton for CFC web service.; nested exception is:   coldfusion.xml.rpc.CFCInvocationException: [java.lang.NoClassDefFoundError : [Lservicetest2;][java.lang.ClassNotFoundException : servicetest2][java.lang.NoClassDefFoundError : servicetest2 (wrong name: ServiceTest2)]  faultActor:   faultNode:   faultDetail:   {http://xml.apache.org/axis/}hostname:AZR885QASRV01

 

But When I add mapping to web service path then it start working but that add one more namespace  in the WSDl file like

<import namespace="http://abcd123456"/>

 

 

I have imported certificate as well but no luck. 

 

Can you Please help.

Views

293

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 04, 2018 0
Adobe Community Professional ,
Jul 05, 2018

Copy link to clipboard

Copied

Mahi, I see you referring to the 2nd CFC as the name of the type of argument in the first. But why do you refer to it with array nomenclature? What happens if you just use type=”servicetest2”? I’m not in a position at the moment to test it for you, but rather than leave you hanging I thought I’d put it out there.

/charlie

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 05, 2018 0
New Here ,
Aug 17, 2018

Copy link to clipboard

Copied

then also it's not working.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 17, 2018 0
Adobe Community Professional ,
Aug 18, 2018

Copy link to clipboard

Copied

This is incorrect:

type="ServiceTest2[]"

That is because ColdFusion does not have typed array. You should do something like

<cfcomponent  output="false">

<cffunction name="GetName" returnType="any" access="remote">

<cfargument name="input" type="Servicetest2" >

    <cfreturn arguments.input>

</cffunction>

</cfcomponent>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 18, 2018 0
New Here ,
Aug 27, 2018

Copy link to clipboard

Copied

type="ServiceTest2[]",  This is working on one of my server.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 27, 2018 0
Participant ,
Aug 27, 2018

Copy link to clipboard

Copied

What CFML engine dou you use? Adobe or Lucee? What version?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 27, 2018 0
BKBK LATEST
Adobe Community Professional ,
Aug 27, 2018

Copy link to clipboard

Copied

MAHI  wrote

type="ServiceTest2[]",  This is working on one of my server.

Even if this works in ColdFusion, I won't use it as the input-type of a web service. That is because Service2[] is a type that may mean nothing to the web service consumer.

Service2[] is an array of ColdFusion component types. These are unknown to, for example, Java, C# or PHP. In fact, my guess is that a ColdFusion server will have difficulty consuming your web service.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 27, 2018 0