Beginner's questions about WCF and web services
For the purpose of this forum let me just say that I got my certs back in Dot Net 2.0. I know how to write simple web services. Now someone has dumped a huge package of code on my desk that (I think) contains a WCF project (without documentation
of course). Contains references to System.ServiceModel.
So my questions...
1. What (if anything) is the difference between WCF and Web API?
2. If there is a difference, how do you decide which one to use?
3. Assuming that this project on my desk is a WCF project, where can I find some hints on how to run it in VS2013 Community?
WEB API is restricted to ASP.NET and HTTP.
http://captechconsulting.com/blog/john-nein/aspnet-web-api-vs-windows-communication-foundation-wcf
WCF uses more communication protocols than just HTTP, there are more ways to host a WCF service other than IIS, like a selfhosting exe type WCF server, and WCF is a SOA solution.
WCF is a more robust solution in a whole lot of ways is the bottom line.
http://en.wikipedia.org/wiki/Service-oriented_architecture
http://www.codeproject.com/Articles/515253/Service-Oriented-Architecture-and-WCF
Similar Messages
-
Question about document/literal web service
Hello every body.
I have some question about document/literal web service.
I’ve been working with Axis before.
Axis has four valid signatures for your message-style service methods:
public Element [] method(Element [] bodies);
public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
public Document method(Document body);
public void method(SOAPEnvelope req, SOAPEnvelope resp);
The same I am trying to do with WebLogic API for webservices.
But when I am trying to test web service (public Document method (Document body); )
I have serialized exceptions for org.w3c.dom.Document.
Do I have to write a custom class for org.w3c.dom.Document serialization?
If yes can you give me some idea or example?
The all idea behind this web service is. I have just one web service and mane classes for XML processing. Depends what xml document will be during runtime, web service will be using different class for xml processing. It works fine with Axis, but in case of WebLogic I have some problem.
One more question… How I have to call this web service from java client?
I have seen this example http://www.manojc.com/?sample31 ,
but this web service looks like (Document helloDom()). I need to send Document.
This example works for Dynamic Proxy, but does not work for static call.
Any ideas?? Thank in advance.Hi,
I am getting a similar issue. I created a Document-style/literal webservice and deployed on Weblogic 9.2 . Then I generated client stubs using clientgen. I get the following exception stack trace:
java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SOAPException:
failed to serialize class java.lang.Objectweblogic.xml.schema.binding.SerializationException: type mapping lookup failure on
class=class com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl TypeMapping=TYPEMAPPING SIZE=3
ENTRY 1:
class: java.lang.Object
xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocumentResponse
ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@1125127
deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@18dfef8
ENTRY 2:
class: java.lang.Object
xsd_type: ['http://xmlns.ozarkexpress.com/business/sell']:stns:echoDocument
ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@15e83f9
deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@2a5330
ENTRY 3:
class: java.lang.Object
xsd_type: ['http://www.w3.org/2001/XMLSchema']:xsd:anyType
ser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@bb7465
deser: weblogic.xml.schema.binding.internal.builtin.XSDAnyCodec@d6c16c -
Basic questions about PL/SQL web services and datasource names
Hi there,
I successfully generated a web service for a PL/SQL packaged procedure in JDeveloper 11.1.1.3.0).
In the web service base class the following code was generated:
__dataSource = (javax.sql.DataSource) __initCtx.lookup("java:comp/env/jdbc/dbconnectionDS");However in the weblogic server the datasource name is jdbc/somethingelse so the deployment fails at first.
What is the recommended procedure to solve this issue? The obvious solution is to manually edit the source -- that is what I did and it worked fine. However if I re-generate the web service I will lose my change. Is there a better way to do this?
Another question -- in the generated web.xml file, there is a resource-ref for the datasource. I was hoping that changing the datasource name there would help but it didn't work. What is it used for in this context?
Thanks
LuisHi Vishal,
I did as you suggested but it didn't work... see below more details.
Thanks
Luis
1 - I re-generated the web service from the PL/SQL package. The constructor in CFBTestWSBase class looks likes this:
public CFBTestWSBase() throws SQLException
{ try {
javax.naming.InitialContext __initCtx = new javax.naming.InitialContext();
__dataSource = (javax.sql.DataSource) __initCtx.lookup("java:comp/env/jdbc/custfeedbackDS");
} catch (Exception __jndie) {
throw new java.sql.SQLException("Error looking up <java:comp/env/jdbc/custfeedbackDS>: " + __jndie.getMessage());
}2 - I added the following section to weblogic.xml:
<resource-description>
<res-ref-name>comp/env/jdbc/custfeedbackDS</res-ref-name>
<jndi-name>jdbc/DataSource</jndi-name>
</resource-description>3 - I got the following error when during deployment to weblogic server:
[HTTP:101216]Servlet: "CFBTestWSPort" failed to preload on startup in Web application: "CustFeedbackTestWS.war".
java.sql.SQLException: Error looking up <java:comp/env/jdbc/custfeedbackDS>: While trying to look up comp/env/jdbc/custfeedbackDS in /app/webapp/CustFeedbackTestWS.war/346617503.
at cfbtestws.CFBTestWSBase.<init>(CFBTestWSBase.java:33)
at cfbtestws.CFBTestWSUser.<init>(CFBTestWSUser.java:11)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
... -
Question about MBeans for web service metrics and configuration
Hi,
I'm new to JMX and trying to figure out how to create a MBean structure that captures a tree similar to the following for some web services I'm working on. All the operations will have the same set of metrics I'm collecting, so I'd like to reuse as much of the MBean structure as possible. In addition, the service will have various config parameters that need to be able to be modified during runtime via JMX. Below is an example of something similar to what I'd like to be able to do:
user
+-com.example.ws.CalculatorService
+-Attributes
+-ServiceName
+-ServiceVersion
+ServiceConfigParam1
+ServiceConfigParam2
+Operations
+-SetServiceConfigParam1()
+-SetServiceConfigParam2()
+-AddOperationMethod
+-Attributes
+-RequestCounter
+-ResponseCounter
+-Operations
+-ResetAllCounters()
+-ResetRequestCounter()
+-ResetResponseCounter()
+-SubtractOperationMethod
+Attributes
+-RequestCounter
+-ResponseCounter
+-Operations
+-ResetAllCounters()
+-ResetRequestCounter()
+-ResetResponseCounter()Where the counters are a variety of metrics to collect for each web service operation. Is there a standard/commonly accepted way to implement this? What type of MBean is best suited, standard, or do I need to use dynamic MBeans? Thank you for any pointers to useful references.
/Paul KuykendallI ended up finding the answer after more digging. The page [http://java.sun.com/developer/technicalArticles/J2SE/mxbeans|http://java.sun.com/developer/technicalArticles/J2SE/mxbeans] had a section about handling inter-MXBean references that turned out to be exactly what I was looking for.
This reply is just to help anyone else that stumbles through with a similar problem to mine and point them in the right direction.
/Paul -
Question about Using PAPI Web Service in PowerBuilder 9
Hi, all.
I Have a simple question about using papiws in power builder 9.
In pb9, I created a new Web Service Proxy Wizard and I input a url for papiws(ex. http://seraphpernote:7001/papiws/PapiWebService) and click next.
But I couldn't get any Service List.
In Eclipse, I used this url for using papiws well.
Does anybody know about this case??
help me plz.IIRC you must activate PAPI-WS for the engine. In Studio you do it by right-clicking on the project, then "engine preferences". In enterprise/standalone you must activate PAPI-WS in the Admin Center.
-
Beginner's question about scripting and deployment automation
I am new to the SAP and BusinessObjects world. I do production support for BusinessObjects XI R3.1. One of my functions is to deploy Universe.unv and WEBI Report files from development into QA and production. This is currently a manual process involving downloading files and lots of key strokes and mouse clicks using the BusinessObjects Client Tools. My question ->: is there a way to automate this process? Can I do this with the SAP scripting wizard? I am familiar with many different scripting and programming languages, I just need to be pointed in the right direction.
Thanks for your help!I would take a step back and learn more about the fundamentals of Flash before going farther. In the Welcome Screen of Flash Profressional there is a "Learn" section. Here are some links from it:
Introducing Flash: http://www.adobe.com/go/fl_learn1
Symbols: http://www.adobe.com/go/fl_learn2
Timelines and Animation: http://www.adobe.com/go/fl_learn3
Instance Names: http://www.adobe.com/go/fl_learn4
Simple Interactivity: http://www.adobe.com/go/fl_learn5
ActionScript: http://www.adobe.com/go/fl_learn6 -
Question about Local and Central Services Registry
Hi guru,
We are using CE7.2 and have deployed some BPM DC to it.
After deployment, we can see the web service (we made to start the process) from the local SR.
Now we want to build a central SR on aonther machine (AS Java + SLD + SR) and re-point the previous CE7.2's service reg to this central SR. We did it by running the configuration wizard.
I GUESS after the change, the web service in new BPM DC deployment will be automatically published to the CENTRAL SR, rather than the LOCAL, but it didn't happen, am I wrong ?
I'm wondering what kind of situation will cause automatically registration ?
Please shed some light
thanksTim,
They will be fully documented in the 11g XML DB Developer's guide.
The documentation is still covered by the beta NDA, so I can't show it to you.
I can describe them, though.
They will work through the HTTP server that is part of XML DB, similar to the way that you can currently access data as XML:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb15dbu.htm#i1025534
Or the way you can call stored procedures through the PL/SQL geteway.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_web.htm#ADFNS015
If there is an 11g XE, I expect native web services would work because they don't depend on Java.
They applied for a patent on it:
http://www.freshpatents.com/Techniques-for-automatically-exposing-as-web-services-procedures-and-functions-stored-in-a-database-dt20060622ptan20060136351.php
Doug -
Question about "top-down" web services development
I tried to follow the Oracle "RPC literal top-down web services how-to" to develop a web service with a top-down approach but I have error when I try to compile with Ant the provided example.
This howto is located at: http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/rpc-lit/index.html
The error I have is:
D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit>ant
Buildfile: build.xml
env-check:
check-oracle-home:
check-j2ee-home:
init:
sub-init:
gen-service:
[echo] Generating service artifacts
env-check:
check-oracle-home:
check-j2ee-home:
init:
wsa:
[java] java.util.zip.ZipException: The system cannot find the file specified
[java] at java.util.zip.ZipFile.open(Native Method)
[java] at java.util.zip.ZipFile.<init>(ZipFile.java:112)
[java] at java.util.jar.JarFile.<init>(JarFile.java:127)
[java] at java.util.jar.JarFile.<init>(JarFile.java:65)
[java] Exception in thread "main"
BUILD FAILED
D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit\build.xml:21: The following error occurred while executing this line:
D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit\config\common.xml:63: Java returned: 1
Total time: 1 second
When I look at the common.xml file which is used by the build.xml one I have a class like:
<pathelement location="${ws.lib.dir}/orasaaj.jar"/>
The problem is that I do not have this jar file on my disk and I can't find it on the net. Maybe it is one of the root cause of my build failed.
Does anyone experience this howto successfully and if someone can tell me where to find this jar file it would be great.
ThanksI tried to follow the Oracle "RPC literal top-down web services how-to" to develop a web service with a top-down approach but I have error when I try to compile with Ant the provided example.
This howto is located at: http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/rpc-lit/index.html
The error I have is:
D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit>ant
Buildfile: build.xml
env-check:
check-oracle-home:
check-j2ee-home:
init:
sub-init:
gen-service:
[echo] Generating service artifacts
env-check:
check-oracle-home:
check-j2ee-home:
init:
wsa:
[java] java.util.zip.ZipException: The system cannot find the file specified
[java] at java.util.zip.ZipFile.open(Native Method)
[java] at java.util.zip.ZipFile.<init>(ZipFile.java:112)
[java] at java.util.jar.JarFile.<init>(JarFile.java:127)
[java] at java.util.jar.JarFile.<init>(JarFile.java:65)
[java] Exception in thread "main"
BUILD FAILED
D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit\build.xml:21: The following error occurred while executing this line:
D:\Franck\WebServices\prototype\projectAS10g\exemple\rpc-lit\config\common.xml:63: Java returned: 1
Total time: 1 second
When I look at the common.xml file which is used by the build.xml one I have a class like:
<pathelement location="${ws.lib.dir}/orasaaj.jar"/>
The problem is that I do not have this jar file on my disk and I can't find it on the net. Maybe it is one of the root cause of my build failed.
Does anyone experience this howto successfully and if someone can tell me where to find this jar file it would be great.
Thanks -
Question about configuring REST web service in EBS instance
I am from EBS SCM team. From one wiki page, it says OA Framework provides REST framework to expose OAF BC4J objects as web services. Can you provide more details about how to configure REST web service for one EBS instance? Any related information is also helpful.
Edited by: 936859 on Sep 7, 2012 5:45 PMIIRC you must activate PAPI-WS for the engine. In Studio you do it by right-clicking on the project, then "engine preferences". In enterprise/standalone you must activate PAPI-WS in the Admin Center.
-
Question about oradim and windows services
Hello.
I have a db instance on my W-XP Pro machine that was created with this command:
oradim -new -sid <my_sid> -startmode m -pfile <my_pfile>
Since the creation I only used to need to start the windows service in order to work with the db.
I decided to delete the instance.
oradim -delete -sid <my_sid>
Afterwards I recreated the instance:
oradim -new -sid <my_sid> -startmode m -pfile <my_pfile>
And now I have this strange situation:
First I need to start the windows service (although it does not startup the db) and then starting the db with sqlplus.
Would it be possible restoring to the initial situation?
Thanks in advance.Did you tried changing the database startup as Auto
oradim -edit -sid <my_sid> -startmode auto -SRVCSTART
systemThanks.
Although the above solution is working ok, I am also trying your solution but it seems there must be a syntax error:
D:\>oradim -edit -sid <my_sid> -startmode auto -SRVCSTART system
DIM-00036: Ha introducido una opci¾n no vßlida para el comando -DELETE
D:\>oradim -edit -sid <my_sid> -startmode a -SRVCSTART system
DIM-00003: Falta un argumento para el parßmetro
(I am sorry but I do not understand all the oradim options). -
SSL certificates and Web Services Usage inside Oracle Database Questions!
We have implemented a specific business logic using PL/SQL for our client, so we open a file and process each line of this, doing something in the Database and also call a Web Services (Service1) using UTL_HTTP package. Service1 runs in a Windows 2008 Server in the DMZ as Database server.
Service1 is already working, and we can call the service from PL/SQL without troubles.
However, according with security client's policies they requires all Web services be consumed via https including Service1, so we must to follow the procedure established for Oracle in order to enable the calling of service1 via https from the Database.
Our client's DBA and IT Team are concerned about two subjects before to continue to follow the certificate installation:
- SSL Certificates:
1- Can installed certificates in the Database put in risk the stability of the database?
2- Can installed certificates in the Database generate performance issues?
3- Can installed certificates reloading the Databases?
2- Can installed certificates in the Database generate security issues?
- Web services:
1- Can web services calling from the Database put in risk the stability of the database?
2- Can web services calling from the Database generate performance issues?
3- Can web services calling from the Database generate security issues in the DMZ?
Could you please give us any clues, about the possible negative impact related with the SSL certificates and Web Services Usage inside Oracle Database, if it’s the case this impact exists?.
Those are the links describing the procedure mentioned above.
1 -http://www.kotti.es/2009/11/oracle-wallet/
DB: Oracle 9i.
Average number of lines in file: 300
Periodicity: Twice at day.Thiago:
You are correct in that there should be no problem interacting with a Web service that has an HTTPS endpoint as long as you create a wallet and specify it when you make your UTL_HTTP calls, like the PayPal example.
I am not aware of a PL/SQL utility to create a XMLDsig Standard message, but if you find some Java source out there that does it, you may be able to follow a technique I used for a similar use case:
http://jastraub.blogspot.com/2009/07/hmacsha256-in-plsql.html
Regards,
Jason -
The Oracle Database Programming using Java and Web services book is out
This book http://www.amazon.com/gp/product/1555583296 shows how to build pragmatic applications using the combination of PL/SQL, Java in the database, JDBC, SQLJ, JPublisher, and Web services. It is intented for database developers, DBA, data architects, Java developers and Web services assemblers.
My blog http://db360.blogspot.com/ and the free/sample chapter http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf will give you a feel of the content.
Enjoy, KuassiHi Kuassi,
Thanks for letting us know that your book is available. I have been following one of your articles about "Virtualize Your Oracle Database with Web Services". More specifically "The Database as Web Services Consumer". I think that this is an area that has in the past been under estimated as to the potential benefits.
I am currently trying to develop a solution that consumes several interfaces with a couple of them being published web services, so an ideal solution. I have then spent the last three weeks having to read up about the architecture of Java in the database, Jpublisher and make sense of how it all works together.
I have got very close to getting one of the web services to work but failed due to using 10gR2 where all the java & libraries has moved to version 1.5. The solution is to load the jdk1.4.2 and configure jpublisher to use this. So far so good except this is not available on some platforms, Windows - 64 bit (not itanium).
The configuration is proving very challenging but will hopefully reap rewards.
(Thought I would give you some background to my experience).
Anyway my question to you is having looked at Jdeveloper it appears to do almost anything except consume services into the database, also with Java now being at version 1.5 outside the database for 10gR2 and supporting 1.4 inside, do you see some alignment of these in future database releases?
Finally off to buy your book now as no doubt there is a huge amount more to learn.
Kind Regards
David O'Donnell -
Book: Oracle Database Programming using Java and Web services
This book http://www.amazon.com/gp/product/1555583296 shows how to build pragmatic applications using the combination of PL/SQL, Java in the database, JDBC, SQLJ, JPublisher, and Web services. It is intented for database developers, DBA, data architects, Java developers and Web services assemblers.
My blog http://db360.blogspot.com/ and the free/sample chapter http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf will give you a feel of the content.
Enjoy, KuassiHi Kuassi,
Thanks for letting us know that your book is available. I have been following one of your articles about "Virtualize Your Oracle Database with Web Services". More specifically "The Database as Web Services Consumer". I think that this is an area that has in the past been under estimated as to the potential benefits.
I am currently trying to develop a solution that consumes several interfaces with a couple of them being published web services, so an ideal solution. I have then spent the last three weeks having to read up about the architecture of Java in the database, Jpublisher and make sense of how it all works together.
I have got very close to getting one of the web services to work but failed due to using 10gR2 where all the java & libraries has moved to version 1.5. The solution is to load the jdk1.4.2 and configure jpublisher to use this. So far so good except this is not available on some platforms, Windows - 64 bit (not itanium).
The configuration is proving very challenging but will hopefully reap rewards.
(Thought I would give you some background to my experience).
Anyway my question to you is having looked at Jdeveloper it appears to do almost anything except consume services into the database, also with Java now being at version 1.5 outside the database for 10gR2 and supporting 1.4 inside, do you see some alignment of these in future database releases?
Finally off to buy your book now as no doubt there is a huge amount more to learn.
Kind Regards
David O'Donnell -
Can't run wiki and web services at the same time?
I'm a newbie with Lion Server, but I've been running several web sites successfully for about 6 months. I'm up to Server 10.7.4.
I've been trying ever since the first installation of Server to get the wiki service running. I had absolutely no luck until I turned OFF the web service (always got the "URL does not exist" error when I tried to create a group wiki from inside the Server app). With the web service off, it all starts up fine and I created my first wiki (woohoo). Turning web service back on kills access to the wiki. I don't find reference to this in any of the dicussions, and especially not in Apple's documentation.
Are the Wiki and Web services mutually exclusive? Or is there a way around this?
I'm using Dyndns to provide me with sub-domains to use, and I've dedicated one of them to the wiki service. Traffic comes in on port 8080, where my web sites are on port 80.
Thanks for any pointers...
edbokLR supports tethering using a Canon DLL and EOS Utility probably also supports tethering or at least uses something from a similar Canon DLL. You probably cannot have two different versions of that DLL loaded at the same time, so it makes sense there are problems.
-
Message Monitoring and Web services Sequences .. SOAMANAGER
When can I use Mesage Monitoring and Sequence Monitoring .
We are making a proof a concept and we are the following.
1. A program which executes a proxy and with this proxy we are consuming a web services.
2. The proxy and web services were implemented in the same Abap Machine .
3. We execute the test and everything works very well and we consume the webservice and the program displays the expected result.
Now want to know How can we use the Message Monitoring and the Sequence Monitoring . Is this posible ? Do we have to make any previous configuration?
We don´t have any XI installation and for that we wonder if we can monitorize the webservices sequences ?
Any idea about if we can realize such king of actions ..
Many ThanksHi
I assumes u have dual stack.
You can do the sequence monitoring with or without PI. But without PI you would achieve that thing on the local machine.
You have to do those things at Java End using SAP NWA.
Please see this link
http://help.sap.com/saphelp_nwce10/helpdata/en/46/b00c2a99930764e10000000a1553f6/content.htm
http://help.sap.com/saphelp_nwce10/helpdata/en/46/9cb2b57ded371ae10000000a11466f/content.htm
Maybe you are looking for
-
"Windows 7" on Satellite M100-222 - full discussion
Good day everyone! This post about "Windows 7" on "Toshiba" "Satellite" M100-222. Maybe, this method (and like some drivers & utilities) will be successfully apply for others "Satellite" M100 models. Because some models very similar technically. For
-
Time capsule USB printer works when I connect via ethernet but not over wifi
I have a USB printer hooked up to my new Time Capsule. If I turn off my wifi and connect to the Time Capsule with an ethernet cable it works fine. When I try to do the same thing over wifi (even when I'm sitting next to it) it cant seem to make a sol
-
Hi, I used validation in the transformation and pointed to PASS and FAIL. The fail should generate an error report, but where will i find the error report? Is it in the management console? Appreciate your help. Thanks, Arun
-
OS X Server 4 - Time Machine Restore of client Mac
Can anyone confirm that a client Mac when booted into its Recovery HD is able to perform a full system Restore over the network from a Time Machine back up on OS X Server 4 (Yosemite)? Are the user's login credentials accepted and a list of back ups
-
Tunneling failed in Data Service 2.5.1
We created a set of application which all use Data Services RTMP using port 2038. In the services-config.xml we set up in the my-rtmp channel definition to use rtmpt as the protocol. All applications are compiled with this service-config.xml. For mos