Help me to break a Web Service
Hi all,
I am currently testing Web Services which is developed using J2EE technologies. As a tester I aim at breaking the Web Services which my development team have developed. So give me some Ideas how to break a Web Service? What kind of request I can send to do the same?
Reg,
Rama Krishna Pandia. B
Hi all,
I notice that once i implement the interface from deployable proxy, the problem of "SEI doen't exist" appeared.
Anyone can help pls? anyone encounter the same problem before? It is urgent.
Thank in advance.
Warmest Regards,
Jane
Similar Messages
-
Novice Help with Creating Opportunities Using Web Services 2.0
Hello,
I recently took over our CRM integration services and was asked to push some data via our custom portal.
We use our portal to automate the creation of new opportunities in our Oracle CRM System.
The code was developed using Web Services 1.0
I was recently asked to add data to the "Parent Opportunity" field upon creation of a new Opportunity. Now I may be mistaken and if I am I will be very pleased, but it seems to me this field isn't available in 1.0
If I am mistaken and there IS a way to push data to the "parent opportunity" field using 1.0 Please completely disregard what I have typed below.
Upon looking at the WSLD for 2.0 I see "ParentoptyID" as an available field.
I took it upon myself to try and move this process over to 2.0 but I have hit a few major stumbling blocks. Here is the working code for 1.0:
Public Function CRMAddFinalShipmentOpportunity2(ByVal Session As Session, ByVal Subject As String, ByVal Type As String, ByVal Priority As String, ByVal Account As String, ByVal DueDate As String, ByVal Status As String, ByVal Description As String, ByVal AnnBudget As String, ByVal oppType As String, ByVal partNumber As String, ByVal currency As String, ByVal Territory As String, ByVal Owner As String, ByVal Opp As String) As String
Dim opportunity As nkkcrm.SiebelOpportunity20.Opportunity = New nkkcrm.SiebelOpportunity20.Opportunity
Dim input As New nkkcrm.SiebelOpportunity20.OpportunityInsert_Input
Dim results As New nkkcrm.SiebelOpportunity20.OpportunityInsert_Output
Dim strPriority As String = "1-High,2-Medium,3-Low"
Dim strType As String = "Call,Correspondence,Email,Event,Final Shipment - Book,Final Shipment - Special,Lead Follow-Up,Meeting,Opportunity Follow-Up,Other,Presentation,Quote Follow-Up,Sample Follow-Up,Service Request Follow-Up"
Dim strStatus As String = "Completed,Deferred,Waiting For Someone Else,In Progress,Not Started,Assigned,In Call"
CRMAddFinalShipmentOpportunity2 = ""
' Validate Data (CRM will validate if owner is valid)
If Owner = "" Then
AddError("Error: Missing Owner")
Exit Function
End If
If Subject = "" Then
AddError("Error: Missing Subject")
Exit Function
End If
If strType.IndexOf(Type) < 0 Then
AddError("Error: Invalid or Missing Type")
Exit Function
End If
If strStatus.IndexOf(Status) < 0 Then
AddError("Error: Invalid or Missing Status")
Exit Function
End If
If strPriority.IndexOf(Priority) < 0 Then
AddError("Error: Invalid or Missing Priority")
Exit Function
End If
If Not IsDate(DueDate) Then
AddError("Error: Invalid or Missing DueDate")
Exit Function
End If
Try
opportunity.Url = Session.GetURL()
opportunity.CookieContainer = Session.GetCookieContainer()
'Create the opportunity
Dim tmpAry(0) As nkkcrm.SiebelOpportunity20.Opportunity
input.ListOfOpportunity(0) = tmpAry
input.ListOfOpportunity.SetValue(New nkkcrm.SiebelOpportunity20.Opportunity, 0)
'Assign the opportunity Properties
input.ListOfOpportunity(0).Owner = Owner
input.ListOfOpportunity(0).OpportunityName = Subject
input.ListOfOpportunity(0).AccountName = Account
input.ListOfOpportunity(0).SalesStage = "Rebuy"
input.ListOfOpportunity(0).CloseDate = Date.Today
input.ListOfOpportunity(0).Territory = Territory
input.ListOfOpportunity(0).stProject_Name = "FINAL SHIPMENT REBUY"
input.ListOfOpportunity(0).SourceCampaign = "Rebuy"
input.ListOfOpportunity(0).OpportunityType = oppType
input.ListOfOpportunity(0).Revenue = AnnBudget
input.ListOfOpportunity(0).Description = Description
input.ListOfOpportunity(0).bRebuy = "Y"
input.ListOfOpportunity(0).ProductInterest = partNumber
input.ListOfOpportunity(0).plCurrency_Type = currency
'input.ListOfOpportunity(0).ParentoptyId = Opp
'insert the opportunity
results = opportunity.OpportunityInsert(input)
If results.ListOfOpportunity.Length > 0 Then
CRMAddFinalShipmentOpportunity2 = results.ListOfOpportunity(0).OpportunityId
End If
Catch webex As WebException
AddError(webex.Message)
Catch ex As Exception
AddError(ex.Message)
End Try
End Function
What changes might I need to make in order to make this function correctly using Web Services 2.0?
Currently I get the following errors- For every line of input.ListOfOpportunity(0) I get: '..cannot be indexed because it has no default property.'
Another example of an issue I'm running into is: 'SetValue' is not a member of 'nkkcrm.SiebelOpportunity20.ListOfOpportunityData'We were able to make this work by re-modeling my code after a code sample I found that creates new Activities.
Here's my code in case it helps someone scanning these forums in the future (Disregard the Opportunity entries that are missing when you compare this to my earlier code- Those weren't relevant to making this work or not work, I simply am not using them now.):
Public Function CRMAddFinalShipmentOpportunity2(ByVal Session As Session, ByVal Owner As String, ByVal Subject As String, ByVal Type As String, ByVal Priority As String, ByVal DueDate As String, ByVal Status As String, ByVal Description As String, ByVal POValue As String, ByVal oppType As String, ByVal partNumber As String, ByVal currency As String, ByVal servername As String, ByVal pass As String, ByVal usrname As String) As String
'Get SessionID
Dim sessionId As String
sessionId = getSessionLogin(usrname, pass, servername)
Dim Opportunity As nkkcrm.SiebelOpportunity20.Opportunity = New nkkcrm.SiebelOpportunity20.Opportunity
Dim OppInput As New nkkcrm.SiebelOpportunity20.OpportunityInsert_Input
Dim OppOutput As New nkkcrm.SiebelOpportunity20.OpportunityInsert_Output
Dim strPriority As String = "1-High,2-Medium,3-Low"
Dim strType As String = "Call,Correspondence,Email,Event,Final Shipment - Book,Final Shipment - Special,Lead Follow-Up,Meeting,Opportunity Follow-Up,Other,Presentation,Quote Follow-Up,Sample Follow-Up,Service Request Follow-Up"
Dim strStatus As String = "Completed,Deferred,Waiting For Someone Else,In Progress,Not Started,Assigned,In Call"
'Validate Data (CRM will validate if owner is valid)
If Owner = "" Then
AddError("Error: Missing Owner")
Exit Function
End If
If Subject = "" Then
AddError("Error: Missing Subject")
Exit Function
End If
If strType.IndexOf(Type) < 0 Then
AddError("Error: Invalid or Missing Type")
Exit Function
End If
If strStatus.IndexOf(Status) < 0 Then
AddError("Error: Invalid or Missing Status")
Exit Function
End If
If strPriority.IndexOf(Priority) < 0 Then
AddError("Error: Invalid or Missing Priority")
Exit Function
End If
If Not IsDate(DueDate) Then
AddError("Error: Invalid or Missing DueDate")
Exit Function
End If
'Instantiate OpportunityData
Dim objListOfOpportunity As nkkcrm.SiebelOpportunity20.ListOfOpportunityData
Dim objOpportunity As nkkcrm.SiebelOpportunity20.OpportunityData()
Try
objOpportunity = New nkkcrm.SiebelOpportunity20.OpportunityData(0) {}
objListOfOpportunity = New nkkcrm.SiebelOpportunity20.ListOfOpportunityData()
objOpportunity(0) = New nkkcrm.SiebelOpportunity20.OpportunityData
'Assign the opportunity Properties
objOpportunity(0).Owner = Owner
objOpportunity(0).OpportunityName = Subject
objOpportunity(0).AccountName = "UNKNOWN"
objOpportunity(0).SalesStage = "Rebuy"
objOpportunity(0).CloseDate = Date.Today
objOpportunity(0).Territory = "North America"
objOpportunity(0).stProject_Name = "FINAL SHIPMENT REBUY"
objOpportunity(0).SourceCampaign = "Rebuy"
objOpportunity(0).OpportunityType = oppType
objOpportunity(0).Revenue = POValue
objOpportunity(0).Description = Description
objOpportunity(0).bRebuy = True
objOpportunity(0).ProductInterest = partNumber
objOpportunity(0).plCurrency_Type = currency
'Connect the Opportunity to ListOfOpportunity
objListOfOpportunity.Opportunity = objOpportunity
'Connect ListofOpportunity to Input Parameter
OppInput.ListOfOpportunity = objListOfOpportunity
Opportunity.Url = servername & "/Services/Integration;jsessionid=" & sessionId
'Opportunity.CookieContainer = Session.GetCookieContainer()
Opportunity.OpportunityInsert(OppInput)
Return "success"
Catch webex As WebException
AddError(webex.Message)
Catch ex As Exception
AddError(ex.Message)
End Try
End Function
Public Function getSessionLogin(ByVal usrname As String, ByVal pass As String, ByVal servername As String)
Dim loginurl As String = servername & "/Services/Integration?command=login"
'MessageBox.Show(loginurl);
Dim req As HttpWebRequest = DirectCast(WebRequest.Create(loginurl), HttpWebRequest)
' username and password are passed as HTTP headers
req.Headers.Add("UserName", usrname)
req.Headers.Add("Password", pass)
' cookie container has to be added to request in order to
' retrieve the cookie from the response.
Dim cookie As Cookie
req.CookieContainer = New CookieContainer()
' make the HTTP callby
Dim resp As HttpWebResponse = DirectCast(req.GetResponse(), HttpWebResponse)
If resp.StatusCode = System.Net.HttpStatusCode.OK Then
' store cookie for later...
cookie = resp.Cookies("JSESSIONID")
If cookie Is Nothing Then
Return "invalid session"
End If
Return cookie.Value
Else
Return "invalid session"
End If
End Function -
Need Help.... Web Services
Hello..!!
Kindly help me...
I want to build webservice with java/jsp as described below...
the client will just type the sql query in the text box provided on html (or jsp???) page. and the resulted string from the database will be displayed in the browser.
So, which technologies I should read? Like there are JAX-RPC, SAAJ, etc. and how can I invoke the sring from the database (say MySql) like '2 rows updated'....
please help.
Thanking you.
.MohitWell the way I alwasy treat connections between a mobile client and the server is using a wait screen
I haven't seen all your code, but I found no executable Task in info.java
So if you got in your mobileApp a login screen, for example, and then you got the okCommand to send data, you could switch display to a Wait Screen.
WaitScreens got a method called getTask(), in which you can programm any task - like a connection to a web service -, you must write your code inside the inner method "execute()", so Success command will redirect to a custom display, let's say, for example a SplashScreen with "Hello <loginName>, welcome", or redirecto to another SplashScr with "Sorry, incorrect user/pass"
I work with netbeans, so it's pretty easy to drag a WaitScreen and edit the atomatically-generated method getTask()
So Use a wait Screen =) -
[help] how to client a Web Services server which need authenticate?
I am programming a Web Services Client, and the Web Services need http basic authentication.
Most of codes are generated by Netbeans from a WSDL file, but the program return me a ClientTransportException: request requires HTTP authentication: Unauthorized.
How to write codes and where should I insert them?
printStackTrace as follow:
com.sun.xml.ws.client.ClientTransportException: request requires HTTP authentication: Unauthorized
com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:232)
com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:151)
com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:88)
com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
com.sun.xml.ws.client.Stub.process(Stub.java:248)
com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:134)
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:244)
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224)
com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117)
$Proxy27.zbjdaFmMd0H(Unknown Source)
org.apache.jsp.index_jsp._jspService(index_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)and my page code as follow:
<%--
Document : index2
Created on : 2008-10-13, 16:25:54
Author : Hawkeyes
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h2>Hello World!</h2>
<%-- start web service invocation --%><hr/>
<%
try {
com.heliteq.wsclient.client.ZBJDAFMMD0HV1_Service service
= new com.heliteq.wsclient.client.ZBJDAFMMD0HV1_Service();
com.heliteq.wsclient.client.ZBJDAFMMD0HV1 port = service.getZBJDAFMMD0HV1();
// TODO initialize WS operation arguments here
javax.xml.ws.Holder<com.heliteq.wsclient.client.TableOfZbjdaTbMd0R> tabItab
= new javax.xml.ws.Holder<com.heliteq.wsclient.client.TableOfZbjdaTbMd0R>();
javax.xml.ws.Holder<com.heliteq.wsclient.client.Bapireturn> expReturn
= new javax.xml.ws.Holder<com.heliteq.wsclient.client.Bapireturn>();
port.zbjdaFmMd0H(tabItab, expReturn);
} catch (Exception ex) {
// TODO handle custom exceptions here
%>
<%-- end web service invocation --%><hr/>
</body>
</html>Edited by: Winds on Oct 16, 2008 9:49 AMThis thread will soon be locked. You are replying to a topic which is -years- old, the person you demand help from is not going to see your cry for help.
Create a new thread and post all relevant information that you have, including exception stacktraces that you are getting. But before that you should take a big hint from this thread; the OP found a solution. This means you should be able to find one too, if you take the time to look for it. a Google search on parts of the exception stacktrace usually lead to the answer very quickly. -
Help with setting up basic web service
Hi guys-
I am just getting started with Flex and I am looking to
create a really simple app that uses the XigniteQuotes web service
http://www.xignite.com/xQuotes.asmx).
I know I have to authenticate myself with my email and I have been
looking for some tutorials online but they all seem a little too
advanced for me or they are for Flex Builder 1 (I'm using Flex
Builder 2). If someone could refer to some tutorials I might have
missed or if you wouldn't mind giving me some sample code to get me
started I would really appreciate it. I seem to be running into a
lot of errors trying on my own. Thank you,
-DanHi there,
This tutorial has a section on craeting web requests. It's
not too hard in Flex 2.0
<mx:HTTPService id="idofservice" method="POST"
url="url_to_service.php?" useProxy="false">
<mx:request xmlns="">
<!-- this is where the data you want to send to the script
goes -->
<username>{username.text}</username>
<!-- assuming you had a text input field named username of
course. -->
<password>{password.text}</password>
Take a look at the tutorial.
Hope it helps!
</mx:request>
</mx:HTTPService> -
Help: Exposing BAPI's as Web Services in WAS 6.20
Hello,
I'm very new to WAS and I don't have access to a development environment yet (network issues). I was hoping someone might be able to shed some light on the following:
I'd like to expose certain BAPI's as Web Services in a way that my .NET client can talk SOAP directly to WAS 6.20 (without having to generate proxies). Is this possible?
Also, is there a Web Service Creation Wizard in 6.20 that makes the process of exposing BAPI's simple, similar to the wizard in 6.40? To date I've been able to navigate the BOR and generate WSDL for the BAPI's that I'm interested in however, this doesn't get me all the way there. I'm looking for documentation on how to make the Web Service interface for those BAPI's generally available through WAS.
I'll take anything at this point. Even a pointer to some documentation.
Thanks,
JayHi Jay,
Yes, it is possible in Web AS 6.20 to expose BAPIs as Web services. You find the exact documentation of how to do this in the SAP Service Marketplace: http://service.sap.com/connectors. Then go to "SOAP Processor" --> "Media Library". However, the wizard that helps you create the Web service is not yet available in 6.20.
Regards,
Susanne -
Help needed with flash and web service call
Hi all,
I need some help with web services and flash. I'm very new to flash, so please have that in the back of your mind when reading this :-)
I've got a .swf file, and I would like to display a number received from a web service (using adobe flash professional cs5). Ive added the web service and provided the WSDL, but when i try to "Add Method Call", nothing happens. Why? What am I doing wrong?
Hope someone can helpstart with the button that causes the text to be displayed. find what it does (which may not be easy because most templates are coded by novice or intermediate level coders) and follow that trail to the text. (note: the text may be in a txt or xml file that's loaded.)
to have a button release open a file, use:
yourbtn.onRelease=function(){
getURL("http://www.adobe.com"); -
Help! Invoking the same Web Service from multiple mxml components
Hi,
I'm building an application that interacts with a Web Service. The application (App A) has a tabNavigator with two tabs (Tab1 and Tab2). Tab1 contains a custom component (Comp A) and Tab2 contains another custom component (Comp B). Tab1 is the first tab, and Tab2 is the second tab.
Comp A and Comp B each handles the "creationComplete" event by invoking an operation, Op1, of the Web Service.
The problem is, when App A starts up, Comp B can successfully invoke Op1 in its creationComplete handler, but Comp A cannot. In fact, Comp A's call to Op1 does not return. Comp A is created before Comp B.
If the application has only one tab (either Tab1 or Tab2), each Comp can successfully invoke Op1 at application start-up.
Comp A and Comp B each has its own declaration section for the Web Service and CallResponder for Op1.
I'm using the trial version of Flex Builder 4 and new to flex application development. Any help in debugging this problem would be greatly appreciated.
Much thanks,
--HyongI've been shown by a colleague (who is more experienced in .Net than am I) that this can be achieved by adding the target web service's WSDL to my invoking web service as a Web Reference. The original logic I was using, though working from VB 6 and Active Server Pages, can be simplified through the use of the WSDL definition for implementation in .Net.
Thank you for your responses,
-- Chris -
Help needs to build this web service and do this exercise
**i'm a newbie to java. can anybody give me a help here.**
Exercises :
1) Develop customer profile web service as below: which having two methods saveCustomer and retrieveCustomer
Customer infomation data structure as follows
CustomerID :string
Name :string
phoneNumber : int
Address : Object which contain(home number(int), street(string), town(string))- Complex type object
Age: int
LastBalance: double
Ex1:
you send the SOAP request (in your web service call) with customer id or phone number the web service should return customer information and display as system out.
Note Just hard code customer dummy data inside web service method call getCustomerData which return the customer object.
Ex2
Compose customer object (java object) in client side and send via web service using web service save method to write to a data to text file in server side (in your case same machine , but it create by customer profile web service not the web service client)
Objective of this exercise is to understand web service / soap complex and simple variable types and how to exchange those with SOAP request and response.
Exercise 3:
send some wrong customer id or phone number as input to webservice method "retrieveCustomer" and generate error and send it via SOAP fault to client and display itok thanks any way. i hav done most of the exercise. don't know wthr the appraoch is correct or incorrect. i'll post what i have done up to now.
Customer.java FILE
package com.server;
public class Customer {
public String customerID;
public String customerName;
public int phoneNumber;
public Adress[] address;
public int age;
public double balance;
Address.java FILE
package com.server;
public class Address {
public int homeNumber;
public String street;
public String town;
CustomerService.java FILE
package com.server;
public class CustomerService{
public Customer getCustomerData(int CustomerID){
Address address1 = new Address();
address1.homeNumber = 23;
address1.street = "silva lane";
address1.town = "kandy";
Address address2 = new Address();
address2.homeNumber = 45;
address2.street = "gampola road";
address2.town = "peradeniya";
Address [1] address = new Address[] { address1, address2 };
Customer customer = new Customer();
customer.customerID = "abc";
customer.customerName = "mahesh";
customer.customerphoneNumber = 345565767;
customer.address = address;
customer.age = 25;
customer.balance = 25000.00;
return customer;
}is thr anything i hav missed. please advice.
Edited by: kellyg909 on Mar 31, 2009 9:26 AM -
[help] how to access SAP web services by NetBeans
i have created a "web application" project. and i have created a "web service client" file by WSDL file.
but when i test after i inserted web service operate codes into index.jsp, the tomcat print a error means "HTTP 401 - Unauthorized".
if i access the ws url by browser, it will popup a dialog for username and password. but NetBeans not.
i installed NetBeans full version, include tomcat. and the WSDL file is generated by SAP.
need help.Exception printStackTrace
com.sun.xml.ws.client.ClientTransportException: request requires HTTP authentication: Unauthorized
com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:232)
com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:151)
com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:88)
com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
com.sun.xml.ws.client.Stub.process(Stub.java:248)
com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:134)
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:244)
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224)
com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117)
$Proxy27.zbjdaFmMd0H(Unknown Source)
org.apache.jsp.index_jsp._jspService(index_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)
Wed Oct 15 14:26:54 CST 2008
com.sun.xml.ws.client.ClientTransportException: request requires HTTP authentication: Unauthorized -
Help needed in calling a Web service
Hi,
I want to call a web service from my component. The called web service might have different names, therefore I don't want to use the proxy class way.
I am facing problem in parsing the input parameters from the wsdl file. I have attached the wsdl file at the end.
I am using the javax.wsdl.xml.WSDLReader(axis). I have been able to parse all the bindings, ports and messages but
1. i am not able to parse the wsdl:types to obtain the input parameters
//javax.wsdl.Operation op obtained from the port which alternatively obtained from Definition
Message inputs = op.getInput().getMessage();
Part part = null;
// let's find the input params
Map inputParts = inputs.getParts();
// create the object array which Axis will use to pass in the parameters
inputParams = new Object[inputParts.size()];
s = inputParts.keySet();
it = s.iterator();
int i = 0;
while(it.hasNext())
part = (Part) inputParts.get(it.next());
Afetr performing this, i have no clue as to how to parse the input parameters.
2. How will i generate the java Objects array from these input parameters to pass to the Call.invoke function, i.e.
Call call = (Call) service.createCall();
call.setOperation(portQN, operationName);
Object ret = (Integer) call.invoke(inputParams);
The function takes an object[] as input but since i have complex types involved in wsdl, so how will this object array needs to be populated
WSDL file:
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://V4_0.testcenter8" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax258="http://testcenter8.V4_0.testcenter8/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax257="http://V4_0.testcenter8/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://V4_0.testcenter8">
<wsdl:types>
<xs:schema xmlns:ax260="http://V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8">
<xs:import namespace="http://V4_0.testcenter8/xsd" />
<xs:element name="executeRuleset">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="param0" nillable="true" type="ax257:testcenter8_V4_0_Req" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="executeRulesetResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ax257:testcenter8_V4_0_Resp" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:ax259="http://testcenter8.V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8/xsd">
<xs:import namespace="http://testcenter8.V4_0.testcenter8/xsd" />
<xs:complexType name="testcenter8_V4_0_Req">
<xs:sequence>
<xs:element minOccurs="0" name="cabinetName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
<xs:element minOccurs="0" name="loginReqd" type="xs:boolean" />
<xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
<xs:element minOccurs="0" name="password" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="userName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="testcenter8_V4_0_Resp">
<xs:sequence>
<xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
<xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://testcenter8.V4_0.testcenter8/xsd">
<xs:complexType name="Inputs">
<xs:sequence>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="subject" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Outputs">
<xs:sequence>
<xs:element minOccurs="0" name="category" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="massRequestType" type="xs:int" />
<xs:element minOccurs="0" name="subCategory" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="executeRulesetRequest">
<wsdl:part name="parameters" element="ns:executeRuleset" />
</wsdl:message>
<wsdl:message name="executeRulesetResponse">
<wsdl:part name="parameters" element="ns:executeRulesetResponse" />
</wsdl:message>
<wsdl:portType name="testcenter8_V4_0WebServicePortType">
<wsdl:operation name="executeRuleset">
<wsdl:input message="ns:executeRulesetRequest" wsaw:Action="urn:executeRuleset" />
<wsdl:output message="ns:executeRulesetResponse" wsaw:Action="urn:executeRulesetResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testcenter8_V4_0WebServiceSoap11Binding" type="ns:testcenter8_V4_0WebServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="executeRuleset">
<soap:operation soapAction="urn:executeRuleset" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="testcenter8_V4_0WebServiceSoap12Binding" type="ns:testcenter8_V4_0WebServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="executeRuleset">
<soap12:operation soapAction="urn:executeRuleset" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="testcenter8_V4_0WebServiceHttpBinding" type="ns:testcenter8_V4_0WebServicePortType">
<http:binding verb="POST" />
<wsdl:operation name="executeRuleset">
<http:operation location="testcenter8_V4_0WebService/executeRuleset" />
<wsdl:input>
<mime:content type="text/xml" part="executeRuleset" />
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="executeRuleset" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="testcenter8_V4_0WebService">
<wsdl:port name="testcenter8_V4_0WebServiceHttpSoap11Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap11Binding">
<soap:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap11Endpoint/" />
</wsdl:port>
<wsdl:port name="testcenter8_V4_0WebServiceHttpSoap12Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap12Binding">
<soap12:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap12Endpoint/" />
</wsdl:port>
<wsdl:port name="testcenter8_V4_0WebServiceHttpEndpoint" binding="ns:testcenter8_V4_0WebServiceHttpBinding">
<http:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpEndpoint/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Regards
NitinAn update -
I want to call a web service from my component. The called web service might have different names, therefore I don't want to use the proxy class way.
I am parsing the WSDL file and obtaining the different parameters. But i am having problem in passing the parameters(receiving as well) to the web service and i am not able to find any good refernce on the internet, i am getting the following exception:
org.xml.sax.SAXException: Invalid element in javax.xml.rpc.namespace.QName - inputsobj
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Unknown Source)
at org.apache.axis.AxisFault.makeFault(Unknown Source)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(Unknown Source)
at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source)
at org.apache.axis.message.MessageElement.publishToHandler(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.message.RPCElement.deserialize(Unknown Source)
at org.apache.axis.message.RPCElement.getParams(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at org.apache.axis.client.Call.invoke(Unknown Source)
at javaapplication17.Invoke.axisInvoke(Invoke.java:639)
at javaapplication17.Invoke.parseWSDL(Invoke.java:423)
at javaapplication17.Invoke.run(Invoke.java:76)
at javaapplication17.Invoke.main(Invoke.java:64)
at org.apache.axis.client.Call.invoke(Unknown Source)
Error invoking service : org.xml.sax.SAXException: Invalid element in javax.xml.rpc.namespace.QName - inputsobj
at javaapplication17.Invoke.axisInvoke(Invoke.java:639)
at javaapplication17.Invoke.parseWSDL(Invoke.java:423)
at javaapplication17.Invoke.run(Invoke.java:76)
at javaapplication17.Invoke.main(Invoke.java:64)
Caused by: org.xml.sax.SAXException: Invalid element in javax.xml.rpc.namespace.QName - inputsobj
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Unknown Source)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(Unknown Source)
at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source)
at org.apache.axis.message.MessageElement.publishToHandler(Unknown Source)
at org.apache.axis.message.RPCElement.deserialize(Unknown Source)
at org.apache.axis.message.RPCElement.getParams(Unknown Source)
... 7 more
Following is the code snippet and the passed values to the function:
Parameters passed to the test function:
targetNamespace = "http://V5_0.testcenter8"
serviceName = "testcenter8_V5_0WebServiceHttpSoap11Endpoint"
portName = "http://V5_0.testcenter8:testcenter8_V5_0WebService"
operationName = "executeRuleset"
arrListParameters; //obtained by parsing the XSD using XMLSchema(XSD created from wsdl types tag)
implURI = "http://192.168.56.89:8080/axis2/services/testcenter8_V5_0WebService?wsdl"
test function:
NOTE:some things have been hardcoded.
public void axisInvoke(String targetNamespace, String serviceName, String portName,
String operationName, ArrayList<Parameter> arrListParameters, String implURI)
try
// first, due to a funny Axis idiosyncracy we must strip portName of
// it's target namespace so we can pass it in as targetNamespace, localPart
int index = portName.indexOf(":", portName.indexOf("http://") + new String("http://").length());
String portNamespace = portName.substring(0, index);
portName = portName.substring(index == 0 ? index : index + 1); // to strip the :
javax.xml.rpc.namespace.QName serviceQN = new javax.xml.rpc.namespace.QName(portNamespace, portName);
org.apache.axis.client.Service service = new org.apache.axis.client.Service(new URL(implURI), serviceQN);
javax.xml.rpc.namespace.QName portQN = new javax.xml.rpc.namespace.QName(targetNamespace, serviceName);
// This Call object will be used the invocation
Call call = (Call) service.createCall();
// Now make the call...
System.out.println("Invoking service >> " + serviceName + " <<...");
//call.setOperation(portQN, operationName); //do not work
call.setOperationName(new javax.xml.rpc.namespace.QName("http://V5_0.testcenter8", "executeRuleset"));
call.removeAllParameters();// why there is parameters already added to the list of parameters
//call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
ArrayList<Object> arrListInputParameters = new ArrayList<Object>();
for(int i = 0; i < arrListParameters.size(); i++)
String strParamName = arrListParameters.get(i).strParamName;
String strParamType = arrListParameters.get(i).strParamType;
String strNameSpaceURI = arrListParameters.get(i).strParamNameSpaceURI;
if(strNameSpaceURI.compareToIgnoreCase("http://www.w3.org/2001/XMLSchema") == 0)
boolean isInParam = true;
if(strParamName.compareToIgnoreCase("cabinetName") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("testcenter8");
else if(strParamName.compareToIgnoreCase("loginReqd") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_BOOLEAN, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add(false);
else if(strParamName.compareToIgnoreCase("password") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("D@nger0us");
else if(strParamName.compareToIgnoreCase("userName") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("sanjeev");
else if(strParamName.compareToIgnoreCase("description") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("Change Address");
else if(strParamName.compareToIgnoreCase("subject") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("Credit Card");
else if(strParamName.compareToIgnoreCase("category") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("");
isInParam = false;
else if(strParamName.compareToIgnoreCase("massRequestType") == 0)
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_INTEGER, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add((int) 1);
isInParam = false;
else
call.addParameter(new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
arrListInputParameters.add("");
isInParam = false;
/*if(isInParam)
call.addParameter(strParamName, org.apache.axis.Constants.XSD_STRING, ParameterMode.PARAM_MODE_INOUT);
//call.addParameter(strParamName, new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), ParameterMode.PARAM_MODE_INOUT);
else
call.addParameter(strParamName, new javax.xml.rpc.namespace.QName(strNameSpaceURI, strParamName), ParameterMode.PARAM_MODE_INOUT);
/*inputParams = new Object[arrListInputParameters.size() + 1];
inputParams[0] = "";
for(int i = 1; i <= arrListInputParameters.size(); i++)
inputParams[i] = arrListInputParameters.get(i - 1);
inputParams = new Object[arrListInputParameters.size()];
for(int i = 0; i < arrListInputParameters.size(); i++)
inputParams[i] = arrListInputParameters.get(i);
call.setReturnType(org.apache.axis.Constants.XSD_QNAME);
//call.setReturnType(org.apache.axis.Constants.XSD_ANYTYPE);
call.setTargetEndpointAddress(new URL("http://192.168.56.89:8080/axis2/services/testcenter8_V5_0WebService.testcenter8_V5_0WebServiceHttpSoap11Endpoint"));
Object ret = call.invoke(inputParams);
System.out.println("Result returned from call to " + serviceName + " -- " + ret);
System.out.println("Finished");
catch(java.net.MalformedURLException e)
System.out.println("Error invoking service : " + e);
e.printStackTrace();
catch(javax.xml.rpc.ServiceException e2)
System.out.println("Error invoking service : " + e2);
e2.printStackTrace();
catch(java.rmi.RemoteException e3)
System.out.println("Error invoking service : " + e3);
e3.printStackTrace();
WSDL file:
WSDL file:
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://V4_0.testcenter8" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax258="http://testcenter8.V4_0.testcenter8/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax257="http://V4_0.testcenter8/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://V4_0.testcenter8">
<wsdl:types>
<xs:schema xmlns:ax260="http://V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8">
<xs:import namespace="http://V4_0.testcenter8/xsd" />
<xs:element name="executeRuleset">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="param0" nillable="true" type="ax257:testcenter8_V4_0_Req" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="executeRulesetResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ax257:testcenter8_V4_0_Resp" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:ax259="http://testcenter8.V4_0.testcenter8/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://V4_0.testcenter8/xsd">
<xs:import namespace="http://testcenter8.V4_0.testcenter8/xsd" />
<xs:complexType name="testcenter8_V4_0_Req">
<xs:sequence>
<xs:element minOccurs="0" name="cabinetName" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
<xs:element minOccurs="0" name="loginReqd" type="xs:boolean" />
<xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
<xs:element minOccurs="0" name="password" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="userName" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="testcenter8_V4_0_Resp">
<xs:sequence>
<xs:element minOccurs="0" name="inputsobj" nillable="true" type="ax258:Inputs" />
<xs:element minOccurs="0" name="outputsobj" nillable="true" type="ax258:Outputs" />
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://testcenter8.V4_0.testcenter8/xsd">
<xs:complexType name="Inputs">
<xs:sequence>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="subject" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Outputs">
<xs:sequence>
<xs:element minOccurs="0" name="category" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="massRequestType" type="xs:int" />
<xs:element minOccurs="0" name="subCategory" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="executeRulesetRequest">
<wsdl:part name="parameters" element="ns:executeRuleset" />
</wsdl:message>
<wsdl:message name="executeRulesetResponse">
<wsdl:part name="parameters" element="ns:executeRulesetResponse" />
</wsdl:message>
<wsdl:portType name="testcenter8_V4_0WebServicePortType">
<wsdl:operation name="executeRuleset">
<wsdl:input message="ns:executeRulesetRequest" wsaw:Action="urn:executeRuleset" />
<wsdl:output message="ns:executeRulesetResponse" wsaw:Action="urn:executeRulesetResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testcenter8_V4_0WebServiceSoap11Binding" type="ns:testcenter8_V4_0WebServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="executeRuleset">
<soap:operation soapAction="urn:executeRuleset" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="testcenter8_V4_0WebServiceSoap12Binding" type="ns:testcenter8_V4_0WebServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<wsdl:operation name="executeRuleset">
<soap12:operation soapAction="urn:executeRuleset" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="testcenter8_V4_0WebServiceHttpBinding" type="ns:testcenter8_V4_0WebServicePortType">
<http:binding verb="POST" />
<wsdl:operation name="executeRuleset">
<http:operation location="testcenter8_V4_0WebService/executeRuleset" />
<wsdl:input>
<mime:content type="text/xml" part="executeRuleset" />
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="executeRuleset" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="testcenter8_V4_0WebService">
<wsdl:port name="testcenter8_V4_0WebServiceHttpSoap11Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap11Binding">
<soap:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap11Endpoint/" />
</wsdl:port>
<wsdl:port name="testcenter8_V4_0WebServiceHttpSoap12Endpoint" binding="ns:testcenter8_V4_0WebServiceSoap12Binding">
<soap12:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpSoap12Endpoint/" />
</wsdl:port>
<wsdl:port name="testcenter8_V4_0WebServiceHttpEndpoint" binding="ns:testcenter8_V4_0WebServiceHttpBinding">
<http:address location="http://192.168.56.89:8080/axis2/services/testcenter8_V4_0WebService.testcenter8_V4_0WebServiceHttpEndpoint/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions> -
Help with Radio Group and Web Service
Hi,
I created a Radio Group with Dynamic Entry List (Web Service). It seems my list keeps coming back empty. I am on SP10.
When I deploy I get warnings that "Entry List is missing output fields mapping. I think this is a warning only because I don't have my form connected to any other components. I just want to see the radio group populated. I don't think this is the cause.
I see references out there to this "Dynamic List" not working until SP12? Can anyone add some insight to what is wrong? unsupported until later?
Thanks!I created a new model and the new model works fine. Something must be cached.
-
Help: Flex can't parse web service fault message correctly
When I use class WebService to issue requests but the
server-side returns error, it is assumed the instance of FaultEvent
class in fault-event-handler contains error information. However
when inspecting member variables of the object I can only found
some very general error information which can't be mapped to the
original error on server side.
E.g.
The server side returns a SOAP document to Flex like:
<env:Envelope xmlns:env="
http://schemas.xmlsoap.org/soap/envelope/">
<env:Header />
<env:Body>
<env:Fault>
<faultcode>env:Client</faultcode>
<faultstring>com.sap.sbs.silo.bean.interfaces.ServiceException:
[SESSION] : No session can serve the request, pls check if the
session is expired!</faultstring>
<detail>
<ns1:ServiceException xmlns:ns1="
http://service.bean.silo.sbs.sap.com"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<reason>-1</reason>
<message>[SESSION] : No session can serve the request,
pls check if the session is expired!</message>
</ns1:ServiceException>
</detail>
</env:Fault>
</env:Body>
</env:Envelope>
But instance of FaultEvent class in Flex fault-event-handler
only contains general error informatin like: (the following values
are gotten during debug)
event = mx.rpc.events.FaultEvent
- fault = mx.rpc.Fault (@541e5e1)
- description = "HTTP request error" : String
- detail = "Error: [IOErrorEvent type="ioError"
bubbles=false cancelable=false eventPhase=2 text="Error #2032:
Stream Error。 URL:
http://PVGD50033332A:8080/silo/SessionService"
URL:
http://PVGD50033332A:8080/silo/SessionService"
: String
- errorID = 0 [0x0] : Number
- faultCode = "Server.Error.Request" : String
- faultcode = "Server.Error.Request" : String
- faultDetail = "Error: [IOErrorEvent type="ioError"
bubbles=false cancelable=false eventPhase=2 text="Error #2032:
Stream Error。 URL:
http://PVGD50033332A:8080/silo/SessionService"
URL:
http://PVGD50033332A:8080/silo/SessionService"
: String
- faultString = "HTTP request error" : String
- faultstring = "HTTP request error" : String
- message = "faultCode:Server.Error.Request
faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent
type="ioError" bubbles=false cancelable=false eventPhase=2
text="Error #2032: Stream Error。 URL:
http://PVGD50033332A:8080/silo/SessionService"
URL:
http://PVGD50033332A:8080/silo/SessionService'"
: String
- name = "Error" : String
- rootCause = flash.events.IOErrorEvent (@5572371)
- bubbles = false : Boolean
- cancelable = false : Boolean
- currentTarget = flash.net.URLLoader (@541e431)
- eventPhase = 2 [0x2] : Number
- target = flash.net.URLLoader (@541e431)
- text = "Error #2032: Stream Error。 URL:
http://PVGD50033332A:8080/silo/SessionService"
: String
- type = "ioError" : String
Could anybody tell me where I can find the original error
information like 'No session can serve the request, pls check if
the session is expired!' in Flex web service framework?I am also encountering the exact same issue using Apache Axis
1.4 (
http://ws.apache.org/axis/)
as my web services stack. The fault information is seemingly
nowhere to be found. Can someone from the Flex support team please
sound off on this issue. Is fault data supposed to somehow be made
available? I would imagine it would be if meaningful error messages
are to be returned from Web Services in Flex. -
Help needed in designing the Web Service Interface
Hi,
In have a scenario where a client will be sending an XML file , which is a SOAP message to a webservice. I would like to know what the input datatype for this interface would be?
Is the following correct?
interface MyWebService{
public String recieveMessage(String aSOAPMessage);
Also once I get the SOAP message what is the best way to parse or iterate through its contents.
Any pointers or examples would be highly appreciated.
Thanks
MurtuzaHi,
In have a scenario where a client will be sending an XML file , which is a SOAP message to a webservice. I would like to know what the input datatype for this interface would be?
Is the following correct?
interface MyWebService{
public String recieveMessage(String aSOAPMessage);
Also once I get the SOAP message what is the best way to parse or iterate through its contents.
Any pointers or examples would be highly appreciated.
Thanks
Murtuza -
HELP! Can not access Web Service
I get error below if webservice asmx and URL of domain do not
match...
they both have to have
http://www or no 'www' in order to run...
otherwise I get the following error below BUT my cross domain
is at
the root of the webserver!! what am I doing wrong???:
[RPC Fault faultString="Security error accessing url"
faultCode="Channel.Security.Error" faultDetail="Unable to
load WSDL. If currently online, please verify the URI and/or
format of
the WSDL
http://www.velocitytrading.net/VTOrdEnt.asmx?WSDL)"
at mx.rpc.wsdl::WSDLLoader/faultHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc::AbstractInvoker/
http://www.adobe.com/2006/flex/mx/internal::dispatchRpcE\
vent()
at
mx.rpc::AbstractInvoker/
http://www.adobe.com/2006/flex/mx/internal::faultHandler\
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at DirectHTTPMessageResponder/securityErrorHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/redirectEvent()
CROSS DOMAIN
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="
http://velocitytrading.net"/>
<allow-access-from domain="
http://www.velocitytrading.net"/>
<allow-access-from domain="*.*"/>
</cross-domain-policy>Hi CJSteu,
Can u add this crossdomain.xml in ur server bin and dtd also
if needed and check the server is able to invoking the
crossdomain.xml by
url ex:
http://localhost:7001/crossdomain.xml
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" />
<allow-http-request-headers-from domain="*"
headers="*"/>
</cross-domain-policy>
Maybe you are looking for
-
BAdi - Automatic Creation of Transaction Type (Activities/Tasks)
Dear Experts, we have a customer requirement to create automatically Activities/Tasks if a certain date is reached. The user just want to receive a alarm/note when there is a created acitivitie. Which BAdi we casn use for the automatic creation of ac
-
Creating Planned Independent Requirements for an MRP Area.
Hi All, I am trying to enter Planned Independent Requirements for an MRP Area, with requirement type VSE and I get the following error; "Only stock requirements are allowed when planning at MRP area level". I can enter at the Plant level with no prob
-
I've seen this operator in a Java book I'm reading, but it's not explained. Could anyone fil me in? width >> 1
-
Modifying code so that JCheckBox can be used instead of JComboBox
Hello. how can I modify the following code so that JCheckBox can be used instead of JComboBox? Thanks. import javax.swing.*; import java.sql.*; import java.awt.*; import java.awt.event.*; public class Exercise32_6 extends JApplet { private JComboBo
-
Problem with CUBAC 8.6 Client in windows 7
after migration to Windows 7 in CUBAC 8.6 does not display the corporate directory, error: Could not download the user preferences. In the Parameters of the operator of the status shows the server as offline, if I connect it connects without problems