Business Service with multiple HTTP Request Methods
hi all -
I'm new to OSB and trying to prototype a solution. I have a service provider that exposes a number of HTTP operations (GET/PUT/POST/DELETE). It's a JAX-RS implementation.
I was looking to create 1 proxy service and 1 business service for that service provider. But, within my business service, I must chose a 'HTTP Request Method' and it allows only 1 type (either GET, PUT, POST, DELETE). So, I have something working, but only for a single type (POST in my prototype). I figure I could create more proxy and business services for the other HTTP Request Methods, but I'm not sure if this is the correct approach (design/architecture).
My other thought was to create a proxy service to front the service provider, but looking at the documentation, it looks like there should be a business service for each proxy service. If it's possible to use a proxy service without a business service to mediate the service provider, where would I add my URLs for the service provider in the proxy service.
My apologies on the 2 part architecture/design question. I thought the group would help with getting me started.
thanks jim
Hi,
Frankly I dont know too much on this topic but following links may help you:
http://help.sap.com/saphelp_nw04/helpdata/en/25/dda73e5b7a424de10000000a114084/frameset.htm
Troubleshooting ICF: http://help.sap.com/saphelp_nw04/helpdata/en/80/b2dd3a6dac703be10000000a11405a/content.htm
Possibly experts in this forum will be able to help you: Application Server->Internet Transaction Server (ITS)
Regards,
Gourav
Similar Messages
-
ICF service with Multiple HTTP request handlers.
Hi ,
I have created a ICF service with "One HTTP request handler" using SICF transaction.
it's working fine.
After that i have added anther "HTTP request handler".
i have put two External Break Points in two HTTP request handler classes.
and i have debugged it.
My problem is:
The request is cached by first HTTP request handler.
at the end it returns the response.
it does not reached the second HTTP request handler.
how can i forward my request to second HTTP request handler.
please help me.
lakshmanHi,
Frankly I dont know too much on this topic but following links may help you:
http://help.sap.com/saphelp_nw04/helpdata/en/25/dda73e5b7a424de10000000a114084/frameset.htm
Troubleshooting ICF: http://help.sap.com/saphelp_nw04/helpdata/en/80/b2dd3a6dac703be10000000a11405a/content.htm
Possibly experts in this forum will be able to help you: Application Server->Internet Transaction Server (ITS)
Regards,
Gourav -
Dynamic routing for a Business Service with multiple operations
I have two business services with multiple operations. Business service A (bsA) has operations OpA1 and OpA2. Business service B (bsB) has operations OpB1 and OpB2.
Depending on incoming Proxy message and operation, I have to do one of the following
1. If someValue = A and operation= Op1 then invoke operation opA1 of bsA
2. If someValue = B and operation= Op1 then invoke operation opB1 of bsB
3. If someValue = C and operation= Op1 then invoke operation opA1 of bsA AND* operation opB1 of bsB and return aggregate data of both invocations
1. If someValue = A and operation= Op2 then invoke operation opA2 of bsA
2. If someValue = B and operation= Op2 then invoke operation opB2 of bsB
3. If someValue = C and operation= Op2 then invoke operation opA2 of bsA AND* operation opB2 of bsB and return aggregate data of both invocations
Using a dynamic route node or dynamic routing options, I am able to achieve cases 1, 2, 4, and 5.
But for cases 3 & 6, I can not use a route node. When I use a Service call out instead, then I am forced to create a Operational branch but that does not seem like the best design since for every new operation added to the business services, I have to add a new branch to the Operational branch and redo all the functionality for that branch.
Basically, I am looking to achieve the functionality of the Route node ( no need to specify the operation ).
Any thoughts/ideas on what the best design would be?
thanksFor cases 3 & 6, why don't you route to another proxy service where you can simple do two service callouts, merge output data somehow and return them to the first proxy?
If you look for "special route feature", that could possibly call two services for a single message, I'm afraid you won't succeed. -
Custom hostname verifier not used when business services use a http proxy
On OSB 10.3, we have a business services with an https end point. To access this end point, the business service used an http proxy.
The certificate of the business endpoint is a wildcard certificate *.certificate.be . So we have a custom hostname verifier defined in the ssl configuration on the weblogic Server
As we can see with the verbose mode at the jvm, the custom hostname verifier is not used when we use a http proxy in the business service. Osb use a ALSBHostnameVerifier and this one the defaulthostName
<Mar 2, 2011 7:31:11 AM CET> <Debug> <AlsbTransports> <BEA-000000> <*** Connecting via proxy *** HTTP @ my.proxy.be/XXX.XXX.XXX.XXX:8080>
[Loaded com.bea.wli.sb.transports.http.ALSBHostnameVerifier from file:/bea/osb_10.3/lib/sb-transports-main.jar]
[Loaded weblogic.security.utils.SSLWLSHostnameVerifier$DefaultHostnameVerifier from file:/bea/wlserver_10.3/server/lib/weblogic.jar]
Is there any way to force business service to used hostname verfifier defined in weblogic ssl server config?
ThanksThis is a known issue. Raise a case with support and ask a patch for bug#9182604
Regards,
Anuj -
How to call rest service with POST Http method in SMP2.3 HWC?
Hi Experts,
I am doing a sample for Rest Service in smp.
http://192.168.1.119:8086/Test/services/Products
I am calling the above service in the smp it is pulling the data from the service with GET Http Method.
Now i want to call this service for login functionality.
http://192.168.1.119:8086/Test/services/auth?uname=:uname&pass=:pass
here :uname &:pass values are argument values for the uname & pass.
the output of the service is
http://192.168.1.119:8086/Test/services/auth?uname=sravanya.k&pass=sravanya
<?xml version="1.0" encoding="UTF-8"?>
<details>
<responsecode>200</responsecode>
<profile>
<firstname>sravanya</firstname>
<lastname>k</lastname>
<email>[email protected]</email>
<chart_type>North</chart_type>
<location>MACHILIPATNAM</location>
<language>English</language>
</profile>
</details>
How can i do this?
Thanks & Regards,
Sravanya KCreate a uriTemplate like this
/auth?uname={uname}&pass={pass}
use GET method only.
generate the personalization keys. -
How best to make a transaction span multiple HTTP requests?
Hi, all. What is the best way to implement a transaction that spans multiple
HTTP requests? Many J2EE applications must solve this problem, but I can't
any guidelines for an implementation.
Consider an application that implements a multi-step wizard. Each step
gathers data from the user; step one gets the user's name, and step two gets
his dog's name. When the user completes the wizard, the application saves
the user & dog in two entity beans. Conceptually, the application treats
this wizard like a single, long-running transaction. The transaction begins
when the user launches the wizard. Submitting the JSP for step one adds the
Boy bean to the transaction, and submitting step two adds the Dog bean.
Finishing the wizard commits the transaction. Exiting the wizard or timing
out causes the transaction to rollback.
Although the wizard looks like a transaction, the entire sequence of user
interactions can't be captured in a single JTA UserTransaction. A
UserTransaction must be associated with a single thread, but each wizard
step is handled asynchronously by its own execution thread. It's impossible
to funnel the conversation through one thread that can demarcate the
transaction. (This would be a pretty dumb solution for other reasons, but I
don't want to get lost in details.)
I think the standard way to solve this problem is to store conversation
state in a stateful session bean (or the http session) and create / update
both entity beans in a transactional EJB method after the wizard completes.
Unfortunately, this solution prevents me from leveraging a lot of great
transaction management features provided by the app server. For example, I
can't use optimistic concurrency to make sure that the dog object hasn't
changed in the database between the start and end of the wizard. Also, I'm
forced to keep track of changes to the dog object in the conversation state,
then replicate these changes to an entity bean at the end of the wizard.
Keeping track of state in a stateful bean is pretty straightforward, but it
seems like there must be an existing solution that leverages the appserver's
concurrency and state management features. Am I missing something? Is there
code, a pattern, or an article that describes the best way to implement a
multi-step process that looks transactional? I suppose WLI does what I want,
but that feels like killing a roach with a SCUD missle. Thanks for any
advice.
DaveDave Smith wrote:
Without a transaction, will the app server manage the version column
automatically, assuming of course that <concurrency-strategy> is
"Optimistic" and <verify-columns> is set to "Version"? Of course, I'll have
to expose the version as a cmp-field, which is fine with me.Yes
>
Do you know offhand, so that I don't have to get off my lazy ass and write a
test, whether the CMP service will create the version column when it
generates db tables? (I realize it's not good to let WLS generate the tables
in a production system.)No, I don't think it does.
>
I assume from your answer that I'm on my own for implementing stuff like and
transaction inheritance and tracking object modifications? Well, we'll give you a bit of help on the object modifications. The
usual pattern is when you're pushing the JavaBean back to the CMP you
call all the setXXX methods on the CMP bean. Our CMP container will
check if the value you are setting is the same as read from the db. If
so, it will not update that column.
-- Rob
If so, no big
deal. I was just hoping somebody would say, "Oh, you want the Jakarta
SuperBeans project" or something.
Thanks,
Dave
"Rob Woollen" <[email protected]> wrote in message
news:[email protected]...
I'd recommend that you include a separate version or timestamp column in
your db schema.
Then do something like this:
Client Server
1) First HTTP Request
2) Read current Dog and Boy Entity Beans
(if any) and copy their values into a JavaBean.
You want to include the version
column(s) in the JavaBean(s) along with the data values.
You probably also want to store the JavaBeans in
your HTTP Session.
3) Client proceeds through wizard interacting with JavaBeans
4) Finish with Wizard, copy JavaBean values (including
version columns) to CMP 2.0 Entity Beans.
The version column will give you the optimistic concurrency protection
that you desire without opening a JTA transaction to span user input.
-- Rob
Dave Smith wrote:
Hi, all. What is the best way to implement a transaction that spans
multiple
HTTP requests? Many J2EE applications must solve this problem, but Ican't
any guidelines for an implementation.
Consider an application that implements a multi-step wizard. Each step
gathers data from the user; step one gets the user's name, and step twogets
his dog's name. When the user completes the wizard, the applicationsaves
the user & dog in two entity beans. Conceptually, the application treats
this wizard like a single, long-running transaction. The transactionbegins
when the user launches the wizard. Submitting the JSP for step one addsthe
Boy bean to the transaction, and submitting step two adds the Dog bean.
Finishing the wizard commits the transaction. Exiting the wizard ortiming
out causes the transaction to rollback.
Although the wizard looks like a transaction, the entire sequence ofuser
interactions can't be captured in a single JTA UserTransaction. A
UserTransaction must be associated with a single thread, but each wizard
step is handled asynchronously by its own execution thread. It'simpossible
to funnel the conversation through one thread that can demarcate the
transaction. (This would be a pretty dumb solution for other reasons,but I
don't want to get lost in details.)
I think the standard way to solve this problem is to store conversation
state in a stateful session bean (or the http session) and create /update
both entity beans in a transactional EJB method after the wizardcompletes.
Unfortunately, this solution prevents me from leveraging a lot of great
transaction management features provided by the app server. For example,I
can't use optimistic concurrency to make sure that the dog object hasn't
changed in the database between the start and end of the wizard. Also,I'm
forced to keep track of changes to the dog object in the conversationstate,
then replicate these changes to an entity bean at the end of the wizard.
Keeping track of state in a stateful bean is pretty straightforward, butit
seems like there must be an existing solution that leverages theappserver's
concurrency and state management features. Am I missing something? Isthere
code, a pattern, or an article that describes the best way to implementa
multi-step process that looks transactional? I suppose WLI does what Iwant,
but that feels like killing a roach with a SCUD missle. Thanks for any
advice.
Dave -
Developing Business Services with ADF BC
Hello all,
I was following the tutorial at http://www.oracle.com/technology/obe/obe1013jdev/10131/bslayer/bslayer.htm#t2s5, which is Developing Business Services with ADF Business Components
AND i was wondering if i could add a custom validation that would: prevent the user from entering a Gender IF the credit limit is greater than 400? Is this possible? If so, could some point me in the right direction
CheersHi,
you have two options:
1. add the validation on the ADF BC model using a method validator. This would compare the two attributes and throw an exception if the business rule is violated
2. Use a ValueChange Listener on the credit limit field (in association with a autosubmit=true setting on the field) to enable the gender field through a Partial Page Refresh. To programmatically refresh a field using PPR, you create a binding of the component to refresh o a managed bean using its binding property. Then you call
AdfFacesContext.getCurrentInstance().addPartialTarget(<component reference here>)
Frank -
Missing option to change HTTP request method on iView level
Dear all,
I am trying to implement an iView using the ApplicationIntegrator. Unfortunately I am getting the error message "Request Method POST is not allowed". I found this nice weblog where you have the option on the iView level to change the HTTP request method to "GET". Unfortunately I do not have this parameter.
I am on EP6.0 SP 9.
I really appreciate your help and will reward points.
Thanks,
JensI'm not sure I fully follow what the problem is, or I'm misreading the issue.
Just to be clear, you are in Active Directory Domains & Trusts console, you did a click on "Active Directory Domains and Trusts," and then you are saying on the left pane you are not seeing the "Raise Forest Functional Level"
option, such as the following screenshot shows?
I assume there is currently only one domain in the forest.
Was there at any time another domain that was removed, such as a child domain or an additional domain tree, there was removed?
What's the Schema version? To find it, run this without the quotes:
"dsquery * cn=schema,cn=configuration,dc=domainname,dc=local -scope base -attr objectVersion"
Schema Version Matrix:
============================
Version 13 = Windows Server 2000
Version 30 = Windows Server 2003 RTM, Windows Server 2003 with Service Pack 1, Windows Server 2003 with Service Pack 2
Version 31 = Windows Server 2003 R2
Version 44 = Windows Server 2008
Version 47 = Windows Server 2008 R2
Version 56 = Windows Server 2012 RTM
Version 69 = Windows Server 2012 R2
Late Edit:
See the following link for a similar discussion:
Unable to raise forest functional level
https://social.technet.microsoft.com/Forums/windowsserver/en-US/1d777261-ea53-4301-9541-3ea037245986/unable-to-raise-forest-functional-level?forum=winserverDS
Ace Fekay
MVP, MCT, MCSE 2012, MCITP EA & MCTS Windows 2008/R2, Exchange 2013, 2010 EA & 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php
This posting is provided AS-IS with no warranties or guarantees and confers no rights. -
HT4436 What is the best way to set up business accounts with multiple ipads?
What is the best way to set up business accounts with multiple ipads?
Here are three different methods >
How to use multiple iPods, iPads, or iPhones with one computer, http://support.apple.com/kb/HT1495
This article > iOS: How to transfer or sync content to your computer, http://support.apple.com/kb/HT1296
suggests using contacts groups.
When syncing contacts, you can choose to sync all of your contacts or only selected groups.
You can select a group of contacts to which all new contacts created on your iOS device will be added.
You can set up groups in the Address Book application.
If you are all going to use the same iTunes apps library, turn off "Automatically sync new apps" in the apps tab just below the list of apps. Then you won't get new apps on your device unless you select them. -
10.1.3.1 : Developing Business Services with ADF BC tuto issues
Hi,
I was doing a learning session at my office based on the 'Developing Business Services with ADF Business Components' tutorial : http://www.oracle.com/technology/obe/obe1013jdev/10131/bslayer/bslayer.htm. The topic Creating ADF Business Components > 9 shows how to create EOs, VOs, AM and the corresponding UML diagram.
When using JDev 10.1.3.1 :
* the diagram is not generated as expected,
* the java domains are not created from DB domains.
Under JDev 10.1.3.2 :
* the java domains are created from DB domains,
* the diagram has been generated on 1 out of 3 computers.
Any clues on what's going on or any known bugs ?
Thanks,
Seb.Hi,
Today in 10.1.3.1 the diagram generation just works. It seems the keepResident extension was causing troubles as the exception stack trace mentioned its name... I just removed it.
But still, the domains are not generated as expected. I've made several tests even in a fresh installation of JDeveloper 10.1.3.1.
Seb. -
Web service with multiple out parameters
Hi Developers,
I have been playing around with som web services in the developer studio.
I can create a webservice from a normal ejb.
But i can only get one out parameter, which is the return parameter of the ejb.
I tried to make an object to use as return parameter, but then i couldn't use the method for the web service.
Can anyone tell me how to make a web service with multiple out parameters?
Br RasmusHi Developers,
I have the same question, is it possible to have multiple outgoing parameters?
When not, does SAP Netweaver knows a IN-OUT parameter? Because I found on the internet that it is possible to have a IN-OUT parameter. But that was with the BEA Weblogic 8.x.
When not, is then the only solution to return a object? With in this object all the parameters you want.
Or otherwise is there a other workaround?
Thanks in advance,
Marinus Geuze -
Sending Idocs to R/3 Error when Business Service with a party is configured
Hi All,
I'm facing some issue when posting idocs (FINSTA) back to R/3 when Business Service with a party is configured in my Integration Directory. However, I do not have this problem, if the
Business System without Party is configured. It seems that 'adapter specific' setting doesn't
seem to work when you have a party.
I have read the same problem faced by other SDN members as well, some suggested to have the latest patch to solve the problem. FYI, I'm using latest patch SP 15, but the problem still exist. The error that I have in the sxmb_moni is "Unable to convert sender XI party http://sap.com/xi/XI / XIParty / GABXI100 to an IDoc partner".
Please assist. Thanks.Hi Arun,
Thanks for reply.
What do you mean by XI Party must map to a party in the R3 in the partner profile?
For example, If my Party Name in Integration Directory is ABC01, I should create a partner profile of ABC01 in my R3? How if I have business service under the Party ABC001, what should I configure in my R3?
Currently My Partner Profile in R3 is type 'B' - Bank.
Thanks for helps. -
How to post multiple http requests using a single http connection in java
I am using the httpurlconnection class and it allows only to post one request on a connection. I require to post multiple http requests by opening a single connection. Code examples please. Thanx in advance.
Hi
I found this article through Google. I hope it helps a little
http://www.developer.com/tech/article.php/761521
D -
Services with multiple account assignment.
Hi all,
How can I find out the POs which are having the multiple account assignment for the service line items from tables ?
I am looking for services with multiple account assignments
RegardsHi
Go to SE16 , give table name -EKPO
Now if you have purchase order nos with you then copy paste the PO numbers here , or select company code or site to restrict your entries. It will control the performance of the data execution.
Then execute this (remove max no 200 ) . Go to Settings-- Format List -- Choose fields. Deselect all and select fields as per your requirement.If field names are coming in technical names you can change this via settings--User parameter and select -Field Label.
You can extract this report to excel as well. Same PO number with all account assignment category.
Please note if you have high volume of data then extract all the POs under service orders first from EKKO table and copy all the service PO numbers availbvale and paste in table EKPO, it will increase performance as well.
Cheers
Mukta -
Using perl with the HTTP POST method to exchange XML with the Auth service
Has anyone written a perl script to do this yet?
I've been trying all day and keep getting "Content is not allowed in prolog.
I've used the example xml from the docs
<?xml version="1.0" encoding="UTF-8"?>
<AuthContext version="1.0">
<Request authIdentifier="0">
<NewAuthContext orgName="dc=exampleorg,dc=com">
</NewAuthContext>
</Request>
</AuthContext>
Then I read the python post at http://swforum.sun.com/jive/thread.jspa?forumID=79&threadID=22370
and the error changed to Premature end of file.
this is the portion of perl that is getting the error:
use strict;
use LWP::UserAgent;
use HTTP::Request::Common;
my $browser = LWP::UserAgent->new(agent => 'xml client');
my $greeting = <<GREETING;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RequestSet vers="1.0" svcid="auth" reqid="1">
<Request>
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<AuthContext version="1.0">
<Request authIdentifier="0">
<NewAuthContext orgName="dc=belo,dc=com">
</NewAuthContext>
</Request>
</AuthContext>]]></Request>
</RequestSet>
GREETING
my $response = $browser->request(POST 'http://idpoc1.test.belo.com/amserver/authservice',
Content_Type => 'text/xml',
Content => [xmlRequest => $greeting]
print $response->error_as_HTML unless $response->is_success;Your problem seems to lie in the build of the request. Here you use the "sample=$data" which will invalidate the XML itself. I've tested your code changing only the build of the Request and this works fine! Given an XML like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<data>
<txnInfo sourcePartnerCode="6" txnDate="2005.09.08"/>
<unitOfWorkInfo sourceTicketID="SourceTicket_1" diaryEntry="Diray_1" Status="Status_OK"/>
</data>
The Server Stub should look like this :
#!/usr/bin/perl
use XML::Simple;
use Data::Dumper;
print qq{Content-type: text/xml\n\n};
if($ENV{'REQUEST_METHOD'} eq "GET"){
$my_data = $ENV{'QUERY_STRING'};
print "jfghdsfjghsdg$my_data";
} else {
$data_length = $ENV{'CONTENT_LENGTH'};
$bytes_read = read(STDIN, $my_data, $data_length);
print "$bytes_read, $my_data";
$xml = new XML::Simple (KeyAttr=>[]);
print "have passed XML::Simple creation\n";
$data = $xml->XMLin("$my_data");
print "i want to be here \n";
$transcode=$data->{txnInfo}->{sourcePartnerCode};
#print "$data->{txnInfo}->{sourcePartnerCode}";
print $transcode;
CASE: {
($transcode==6) && do {
print "i am here";
$lstmoddat=$data->{txnInfo}->{txnDate};
$srctktid=$data->{unitOfWorkInfo}->{sourceTicketID};
$actvtylogdesc=$data->{unitOfWorkInfo}->{diaryEntry};
$status=$data->{unitOfWorkInfo}->{Status};
$command='bop_cmd -f update1.frg "upd_stats("""Administrator""","""'.$srctktid.'""","""FIP""","""what is this???""")"';
print "$lstmoddat $srctktid $status \n";
print "$command";
system("$command");
print "i am done";
last CASE;
And the client stub should look like this :
use LWP::UserAgent;
use HTTP::Request;
use IO;
#use XML::Writer;
my $ua = LWP::UserAgent->new(env_proxy => 1, keep_alive => 1, timeout => 30, );
open INPUT, "<AcceptIncident.xml";
my @greeting = <INPUT>; #-- Read file containing XML struct to send
print "Hello World\n";
my $data_to_send; #-- And build a string of it
foreach my $newItem (@greeting) {
$data_to_send = "$data_to_send$newItem";
print "Sending \n";
my $head = HTTP::Headers->new(Content_Type => "text/xml", "ID" => "sample");
my $req = HTTP::Request->new('POST', 'http://matrix/cgi-bin/test1.pl', $head, "$data_to_send");
my $response = $ua->request($req);
print $response->as_string; Also you should make sure you have both HTTP::Request amd XML::Simple installed, orelse this will not work.
Hope this is of some help to you.
Maybe you are looking for
-
How to get rid of Stand in Safari?
Since I have installed Mountain Lion, with Safari 6, I get error messages all linked to Stand. It doesn't prevent Safari from functionning. I have tried getting rid of Stand in Safari. I have erased the bundle in the SIMBL folder. I have erased the f
-
Column Not Allowed Here? Why?
CREATE TABLE course_location( venue_id number(6), street_address varchar2(30), postal_code varchar2(8), county varchar2(16), PRIMARY KEY (venue_id) INSERT INTO course_location (venue_id, street_address, postal_code, county) V
-
Colored Background Printing Black
I'm completely new to Photoshop since Christmas. I've created a wedding invitation design and it looks great on the computer. However, when I print the file (saving it both as a .pdf and as a .jpg), everything I have set to a couple different shade
-
How to identify connected devices?
In the Airport Utlity, I can see devices connected to my Time Capsule router. Three of them are identified by name but two are IP and mac address. Is there some way to find out what these last two addresses are (i.e., devices)?
-
CS3 File open by two users simultaneously
I work in an office network environment, at a news paper, and we use InDesign CS3 to lay out our paper. We're having a problem where two users are able to open and work on the same file at the same time, and save it. It's led to work being lost. If o